Nodemon: ์‹œ์ž‘ ์‹œ ์ถฉ๋Œ

์— ๋งŒ๋“  2018๋…„ 06์›” 27์ผ  ยท  4์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: remy/nodemon

  • nodemon -v : 1.17.5
  • node -v : 8.11.3/9.0.0/10.5.0 (์–ด๋Š ๊ฒƒ๋„ ์ž‘๋™ํ•˜์ง€ ์•Š์Œ)
  • ์šด์˜ ์ฒด์ œ: ์ฟ ๋ถ„ํˆฌ 18.04
  • ๋ฐ์Šคํฌํƒ‘ ํ™˜๊ฒฝ: kde plasma 5.12.5
  • ํ„ฐ๋ฏธ๋„: konsole 17.12.3
  • ์‹คํ–‰ํ•œ ๋ช…๋ น: nodemon main.js

์˜ˆ์ƒ๋˜๋Š” ํ–‰๋™

Nodemon์€ ์ด์ „๊ณผ ๊ฐ™์ด ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค. ๋ชจ๋“  ๊ฒƒ์ด ์ž˜ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

์‹ค์ œ ํ–‰๋™

์ด ์Šคํƒ ์ถ”์ ์œผ๋กœ ์ธํ•ด ์ถฉ๋Œ์ด ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

[nodemon] 1.17.5
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node main.js`
/usr/lib/node_modules/nodemon/lib/monitor/watch.js:128
      throw e;
      ^

TypeError: Cannot read property 'prev' of undefined
    at Compiler.<anonymous> (/usr/lib/node_modules/nodemon/node_modules/nanomatch/lib/compilers.js:213:25)
    at Compiler.visit (/usr/lib/node_modules/nodemon/node_modules/snapdragon/lib/compiler.js:129:15)
    at Compiler.mapVisit (/usr/lib/node_modules/nodemon/node_modules/snapdragon/lib/compiler.js:143:12)
    at Compiler.compile (/usr/lib/node_modules/nodemon/node_modules/snapdragon/lib/compiler.js:168:10)
    at Snapdragon.compile (/usr/lib/node_modules/nodemon/node_modules/snapdragon/index.js:156:32)
    at /usr/lib/node_modules/nodemon/node_modules/micromatch/index.js:786:23
    at memoize (/usr/lib/node_modules/nodemon/node_modules/micromatch/index.js:859:13)
    at Function.micromatch.compile (/usr/lib/node_modules/nodemon/node_modules/micromatch/index.js:783:10)
    at create (/usr/lib/node_modules/nodemon/node_modules/micromatch/index.js:686:25)
    at /usr/lib/node_modules/nodemon/node_modules/micromatch/index.js:695:16

์žฌํ˜„ ๋‹จ๊ณ„

๋‚ด๊ฐ€ ์•Œ์ง€๋„ ๋ชปํ•˜๋Š”. ์ด์ „ ์‹œ์Šคํ…œ(linux mint 18)์—์„œ๋Š” ๋ชจ๋“  ๊ฒƒ์ด ์ž˜ ์ž‘๋™ํ–ˆ์Šต๋‹ˆ๋‹ค.


-- ๋คํ”„

node: v10.5.0
nodemon: 1.17.5
command: /home/exeteres/.nvm/v10.5.0/bin/node /usr/bin/nodemon main.js --dump
cwd: /home/exeteres/Projects/admin
OS: linux x64
--------------
{ run: false,
  system: { cwd: '/home/exeteres/Projects/admin' },
  required: false,
  dirs: [ '/home/exeteres/Projects/admin' ],
  timeout: 1000,
  options:
   { dump: true,
     ignore:
      [ '**/.git/**',
        '**/.nyc_output/**',
        '**/.sass-cache/**',
        '**/bower_components/**',
        '**/coverage/**',
        '**/node_modules/**',
        re: /.*.*\/\.git\/.*.*|.*.*\/\.nyc_output\/.*.*|.*.*\/\.sass\-cache\/.*.*|.*.*\/bower_components\/.*.*|.*.*\/coverage\/.*.*|.*.*\/node_modules\/.*.*/ ],
     watch: [ '*.*', re: /.*\..*/ ],
     ignoreRoot:
      [ '**/.git/**',
        '**/.nyc_output/**',
        '**/.sass-cache/**',
        '**/bower_components/**',
        '**/coverage/**',
        '**/node_modules/**' ],
     restartable: 'rs',
     colours: true,
     execMap: { py: 'python', rb: 'ruby' },
     stdin: true,
     runOnChangeOnly: false,
     verbose: false,
     signal: 'SIGUSR2',
     stdout: true,
     watchOptions: {},
     execOptions:
      { script: 'main.js',
        exec: 'node',
        args: [],
        scriptPosition: 0,
        nodeArgs: undefined,
        execArgs: [],
        ext: 'js,mjs,json',
        env: {} },
     monitor:
      [ '*.*',
        '!**/.git/**',
        '!**/.nyc_output/**',
        '!**/.sass-cache/**',
        '!**/bower_components/**',
        '!**/coverage/**',
        '!**/node_modules/**' ] },
  load: [Function],
  reset: [Function: reset],
  lastStarted: 0,
  loaded: [],
  watchInterval: null,
  signal: 'SIGUSR2',
  command:
   { raw: { executable: 'node', args: [ 'main.js' ] },
     string: 'node main.js' } }

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

์ด ๋ฒ„๊ทธ๋Š” ๋ฐœ์ƒํ•œ ์งํ›„์— ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. ์ˆ˜์ • ์‚ฌํ•ญ์„ ์–ป์œผ๋ ค๋ฉด ๋‹ค์‹œ ์„ค์น˜ํ•˜์‹ญ์‹œ์˜ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ https://github.com/micromatch/nanomatch/issues/15 ๋ฅผ ์ฐธ์กฐ

๋ฒ„๊ทธ๋ฅผ ์ผ์œผํ‚ค๊ณ  ๋ฌด์Šจ ์ผ์ด ์ผ์–ด๋‚ฌ๋Š”์ง€ ์•Œ์•„๋‚ธ ํ›„ ํŒจ์น˜ํ–ˆ์Šต๋‹ˆ๋‹ค. ๋ถˆํŽธ์„ ๋“œ๋ ค ์ฃ„์†กํ•˜๊ณ  ์–‘ํ•ดํ•ด ์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.

๋ชจ๋“  4 ๋Œ“๊ธ€

nodemon -v : 1.16.0
๊ทธ๋Ÿฐ ๋ฌธ์ œ๋Š” ์—†๋‹ค

์ด๊ฒƒ๊ณผ ๊ด€๋ จ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:
https://github.com/micromatch/nanomatch/issues/15

๊ทธ๋“ค์ด ์–ธ๊ธ‰ํ•œ ํŒจ์น˜๊ฐ€ ํ†ต๊ณผํ•˜๋Š” ๊ฒƒ์„ ๋ณธ ์ ์ด ์—†์Šต๋‹ˆ๋‹ค

์ผ์‹œ์ ์ธ ํ•ด๊ฒฐ์ฑ…
npm install [email protected]

์ด ๋ฒ„๊ทธ๋Š” ๋ฐœ์ƒํ•œ ์งํ›„์— ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. ์ˆ˜์ • ์‚ฌํ•ญ์„ ์–ป์œผ๋ ค๋ฉด ๋‹ค์‹œ ์„ค์น˜ํ•˜์‹ญ์‹œ์˜ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ https://github.com/micromatch/nanomatch/issues/15 ๋ฅผ ์ฐธ์กฐ

๋ฒ„๊ทธ๋ฅผ ์ผ์œผํ‚ค๊ณ  ๋ฌด์Šจ ์ผ์ด ์ผ์–ด๋‚ฌ๋Š”์ง€ ์•Œ์•„๋‚ธ ํ›„ ํŒจ์น˜ํ–ˆ์Šต๋‹ˆ๋‹ค. ๋ถˆํŽธ์„ ๋“œ๋ ค ์ฃ„์†กํ•˜๊ณ  ์–‘ํ•ดํ•ด ์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.

๊ณ ๋งˆ์›Œ์š”.

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰