Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the issue "node" is working but "nodemon" is not woking on windows 7 64-bit in node.js?

Tags:

node.js

I am new to node.js. node is working fine but when I installed the nodemon package, it gives an error: exception in nodemon killing node, even when installed globally.

 22 Jun 13:07:29 - [nodemon] v1.3.7
 22 Jun 13:07:29 - [nodemon] to restart at any time, enter `rs`
 22 Jun 13:07:29 - [nodemon] watching: *.*
 22 Jun 13:07:29 - [nodemon] starting `node server.js`
 exception in nodemon killing node  
 Error: spawn cmd ENOENT
 at exports._errnoException (util.js:746:11)
 at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
 at child_process.js:1144:20
 at process._tickCallback (node.js:355:11)

 ---------------------------------------------------------- 
 If appropriate, please file an error with the output from:
 $ node                     
 C:\Users\username\AppData\Roaming\npm\node_modules\nodemon\bin\nodemon.
 js server.js --dump
 At http://github.com/remy/nodemon/issues/new
like image 533
Nag Avatar asked Jun 22 '15 08:06

Nag


People also ask

How to fix the ‘nodemon command is not recognized in terminal for Node JS’ error?

To fix the ‘nodemon command is not recognized in terminal for node js server’ error, we can install nodemon locally or install it locally and add a script into package.json to run the local version. To install it locally, we can run: npm install -g nodemon with NPM or: yarn global add nodemon with Yarn. And to add a local version, we run:

Why is my nodemon not working?

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. and your nodemon will start working properly.

What is the current version of nodemon?

nodemon version turned into 2.0.14-alpha.1 with npm i nodemon@debug. Confirming with debug mode on Windows 10 + VSCode + PowerShell.

How to install nodemon globally using NPM?

Install nodemon globally: C:\>npm install -g nodemon Get prefix: C:\>npm config get prefix You will get output like following in your console: C:\Users\Family\.node_modules_global Copy it. Set Path.


1 Answers

Possible solutions.

1. Permissions

The problem may be in your file permissions. Execute in git bash or from windows to give full permission to the project folder.

$ chmod -R 777 [folder] 

2. Environment Variables

Missing "C:\Windows\System32" in the PATH.

Github issue

3. Reinstall

Altogether remove nodemon using npm and try reinstalling.

npm uninstall -g nodemon

4. Update nodejs

If you have an old version of NodeJS, try updating it. I prefer entirely removing NodeJS and reinstalling it again.

Step by steps to remove NodeJS in windows

Note: Your question may not be rich enough to answer correctly. Please include more information about questions if those didn't work.

like image 117
Malindu Avatar answered Nov 14 '22 21:11

Malindu