简体   繁体   中英

error when installing nodemon on Ubuntu 18.04

when i install nodemon with

sudo npm i --save-dev nodemon

i get the following error message:

npm ERR! path /home/dominikpatera/Dropbox/Projekty/Fytwa/server/node_modules/npm/node_modules/abbrev
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/home/dominikpatera/Dropbox/Projekty/Fytwa/server/node_modules/npm/node_modules/abbrev' -> '/home/dominikpatera/Dropbox/Projekty/Fytwa/server/node_modules/npm/node_modules/.abbrev.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/dominikpatera/.npm/_logs/2018-07-11T09_45_21_545Z-debug.log

can you help me fix it?

Open Terminal and type:

sudo npm install -g nodemon

then

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

you will get an output similar to:

fs.inotify.max_user_watches=524288
fs.inotify.max_user_watches = 524288

After that your nodemon will perfectly work.

At first make sure that on your terminal, you are working on the correct project. you can check this by typing ls and then hit enter.

Then give the command to install nodemon. From the official website of nodemon, we found that, we have to write npm install -g nodemon

But if you fall in problem here, then write this-

sudo npm install -g nodemon

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM