I have a problem: nodemon does not run off the npm script (e.g. npm start
),
but if nodemon is called on the command line outside the npm script, nodemon run
I faced a similar issue, but then checked .npmrc file and there was incorrect password in that that caused the connection failure and there fore yarn --verbose returned Bad request error. After correcting the password, the packages were added successfully.
sudo npm install nodemon -g --save
Finally this worked for me. I hope this must work for others too
In my case nodemon needed to be installed globally:
npm i nodemon -g --save
Try to check installed global packages npm list -g --depth=0
. If you will not find nodemon
, - install it with flag -g
or --save-dev
. Don't install nodemon
with flag --save
, because nodemon
uses only for development
.
For Visual Studio Code editor with Windows Sub-system for Linux, i.e, WSL mode:
sudo npm install nodemon -g
for global use of nodemon.
NPM is used to manage packages and download them. However, NPX must be used as the tool to execute Node Packages
Try using NPX nodemon ...
Hope this helps!