Answers for "At line:1 char:1 + nodemon server.js"

2

At line:1 char:1 + nodemon server.js

//You need to install it globally
npm install -g nodemon
// or if using yarn
yarn global add nodemon

/*
And then it will be available on the path (I see now that you have tried 
this and it didn't work, your path may be messed up)

If you want to use the locally installed version,
rather than installing globally then you can create a script in your package.json
*/

"scripts": {
    "serve": "nodemon server.js"
  },
    
//and then use
npm run serve

// without adding serve in package.json
yarn run nodemon server.js
// with serve script in package.json
yarn run serve
Posted by: Guest on March-17-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language