-1

nodemon : The term 'nodemon' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

just trying to install nodemon globally but it is not recognizing..... ( node install nodemon-g )in terminal.enter image description here

Vicky grk
  • 1
  • 1
  • 1

1 Answers1

1

Edit:

If the below steps do not work for you, check this answer as nodemon might not be added to the PATH after installation.


Nodemon is a Node Package that is managed by the Node Package Manager (NPM).

To install Node Packages, you need to use the following command,

npm i package-name    // This will install the package locally as a dependency
npm i -D package-name // This will install the package locally as a dev dependency
npm i -g package-name // This will install the package globally

And so, to install nodemon globally, you would do,

npm i -g nodemon      // For Windows or if you installed NodeJS using NVM on linux
sudo npm i -g nodemon // If you installed NodeJS from from apt or other linux package manager.

node install whatever is not a command and obviously won't work.

Anteraez
  • 86
  • 3
  • @Vickygrk If the answer worked for you, do accept it. If you are still having the issue, do let us know. – Anteraez Oct 18 '19 at 04:14
  • Yes , i have an issue ------- First i install (npm i nodemon -g) globally, after installed nodmon globally i use this command (nodemon app.js) it says //nodemon : The term 'nodemon' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + nodemon app.js + ~~~~~~~ + CategoryInfo : ObjectNotFound: (nodemon:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException// – Vicky grk Oct 18 '19 at 04:21
  • @Vickygrk Try this answer as I think it is an issue with nodemon not being recognized in the path, https://stackoverflow.com/a/53711051/12135751 – Anteraez Oct 18 '19 at 14:09
  • You should do `npm i nodemon --save-dev`, then to run it, `node_modules\.bin\nodemon`. Then this project will have its own special nodemon, and you won't have a version war on your machine when you have more than one codebase. You can also control the version of the nodemon this project uses, in case you need, by adding the version to the install command or editing `package,json`. – doug65536 Jun 09 '23 at 07:39