当我安装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
你能帮我解决这个问题吗?
最佳答案
打开终端并输入:
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将完美工作。
关于javascript - 在Ubuntu 18.04上安装nodemon时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51282563/