I executed the following command:
npm run dev
The dev command is described in package.json as follows:
"dev": "nodemon src/index.js",
And I have the version of nodemon 1.17.5:
"devDependencies": {
....
"nodemon": "^1.17.5",
...
}
But when I run it gives me the following error:
> [email protected] dev C:\dev\node\mern-tasks> nodemon src/index.js
[nodemon] 1.17.5
[nodemon] to restart at any time, enter 'rs'
[nodemon] watching: *.*
[nodemon] starting 'node src/index.js'
C:\dev\node\mern-tasks\node_modules\nodemon\lib\monitor\watch.js:128 throw e;
^
TypeError: Cannot read property 'prev' of undefined
at Compiler.<anonymous> (C:\dev\node\mern-tasks\node_modules\nanomatch\lib\compilers.js:213:25)
at Compiler.visit (C:\dev\node\mern-tasks\node_modules\snapdragon\lib\compiler.js:129:15)
at Compiler.mapVisit (C:\dev\node\mern-tasks\node_modules\snapdragon\lib\compiler.js:143:12)
at Compiler.compile (C:\dev\node\mern-tasks\node_modules\snapdragon\lib\compiler.js:168:10)
at Snapdragon.compile (C:\dev\node\mern-tasks\node_modules\snapdragon\index.js:156:32)
at C:\dev\node\mern-tasks\node_modules\micromatch\index.js:786:23
at memoize (C:\dev\node\mern-tasks\node_modules\micromatch\index.js:859:13)
at Function.micromatch.compile (C:\dev\node\mern-tasks\node_modules\micromatch\index.js:783:10)
at create (C:\dev\node\mern-tasks\node_modules\micromatch\index.js:686:25)
at C:\dev\node\mern-tasks\node_modules\micromatch\index.js:695:16
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: 'nodemon src/index.js'
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Paulo Loaeza\AppData\Roaming\npm-cache\_logs18-06-27T17_33_09_658Z-debug.log
What can it be?