pro-mern-stack
pro-mern-stack copied to clipboard
nodemon error on start server
After instalation of nodemon:
$ npm install nodemon --save-dev
And updating the start script:
"scripts": {
"start": "nodemon -w server.js server.js",
I get this error (ubuntu 16.04 and node v10.14.2):
$ npm start
> [email protected] start /home/eduardo/w/node/pro-mern-stack
> nodemon -w server.js server.js
sh: 1: nodemon: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] start: `nodemon -w server.js server.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] start 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! /home/eduardo/.npm/_logs/2018-12-29T14_00_13_944Z-debug.log
I had to change the nodemon call:
"scripts": {
"start": "npx nodemon -w server.js server.js",