EN
Node.js - 'nodemon' is not recognized as an internal or external command
1
answers
0
points
I've just installed nodemon
for my Node.js server and I cannot run it using nodemon index.js
. Do you know how to run my index.js
file with nodemon
?
Error message:
'nodemon' is not recognized as an internal or external command,
operable program or batch file.
1 answer
3
points
I found the solution:
I installed nodemon
locally and this command works only if the nodemon
was installed globally.
For the locally installed nodemon
I inserted it into "scripts"
inside the package.json
file like this:
"scripts": {
"start": "nodemon index.js"
},
and I run the index.js
file using:
npm start
Second solution is to install nodemon globally with npm:
npm install -g nodemon
or Yarn:
yarn global add nodemon
0 comments
Add comment