I'm trying to install NodeMon for my Node js project. I have tried installing via npm.
npm install nodemon
Provided following result
npm WARN saveError ENOENT: no such file or directory, open '/Users/nodejs/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/Users//nodejs/package.json'
npm WARN nodejs No description
npm WARN nodejs No repository field.
npm WARN nodejs No README data
npm WARN nodejs No license field.
when i have tried running nodemon , It is throwing command not found: nodemon)
Let me know how i can fix this.
CodePudding user response:
I tried the following once i got into this issue and it did not work for me as well:
npm uninstall nodemon
sudo npm uninstall -g nodemon
then i tried this and it worked
sudo npm install -g --force nodemon
CodePudding user response:
I have fixed this by following below steps
Step 1 npm initialisation in the same folder
npm init
npm requests projectName , author , description , entry point
once provided , a package.json file will be added to your project folder.
Step 2
try npm install nodemon
It's Successful.
If still failing after following above steps , try with latest stable version of node and repeat the above process.