在Ubuntu 18.04

时间:2018-07-11 09:59:16

标签: javascript node.js npm nodemon enoent

当我通过

安装 nodemon

sudo npm i --save-dev nodemon

我收到以下错误消息:

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

你能帮我解决吗?

1 个答案:

答案 0 :(得分:0)

打开终端并输入:

sudo npm install -g nodemon

然后

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

您将获得类似于以下内容的输出:

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

此后,您的nodemon将完全正常工作。