nodemon -v
: 1.17.5node -v
: 8.11.3/9.0.0/10.5.0 (์ด๋ ๊ฒ๋ ์๋ํ์ง ์์)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' } }
nodemon -v
: 1.16.0
๊ทธ๋ฐ ๋ฌธ์ ๋ ์๋ค
์ด๊ฒ๊ณผ ๊ด๋ จ๋ ์ ์์ต๋๋ค:
https://github.com/micromatch/nanomatch/issues/15
๊ทธ๋ค์ด ์ธ๊ธํ ํจ์น๊ฐ ํต๊ณผํ๋ ๊ฒ์ ๋ณธ ์ ์ด ์์ต๋๋ค
์ผ์์ ์ธ ํด๊ฒฐ์ฑ
npm install [email protected]
์ด ๋ฒ๊ทธ๋ ๋ฐ์ํ ์งํ์ ๋ฐ์ํ์ต๋๋ค. ์์ ์ฌํญ์ ์ป์ผ๋ ค๋ฉด ๋ค์ ์ค์นํ์ญ์์ค. ์์ธํ ๋ด์ฉ์ https://github.com/micromatch/nanomatch/issues/15 ๋ฅผ ์ฐธ์กฐ
๋ฒ๊ทธ๋ฅผ ์ผ์ผํค๊ณ ๋ฌด์จ ์ผ์ด ์ผ์ด๋ฌ๋์ง ์์๋ธ ํ ํจ์นํ์ต๋๋ค. ๋ถํธ์ ๋๋ ค ์ฃ์กํ๊ณ ์ํดํด ์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค.
๊ณ ๋ง์์.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
์ด ๋ฒ๊ทธ๋ ๋ฐ์ํ ์งํ์ ๋ฐ์ํ์ต๋๋ค. ์์ ์ฌํญ์ ์ป์ผ๋ ค๋ฉด ๋ค์ ์ค์นํ์ญ์์ค. ์์ธํ ๋ด์ฉ์ https://github.com/micromatch/nanomatch/issues/15 ๋ฅผ ์ฐธ์กฐ
๋ฒ๊ทธ๋ฅผ ์ผ์ผํค๊ณ ๋ฌด์จ ์ผ์ด ์ผ์ด๋ฌ๋์ง ์์๋ธ ํ ํจ์นํ์ต๋๋ค. ๋ถํธ์ ๋๋ ค ์ฃ์กํ๊ณ ์ํดํด ์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค.