[nodemon] Internal watch failed: watch ENOSPC错误解决办法

简介:

运行环境:Ubuntu 16.04, WebStorm 2016.1.3, node.js v0.12.5, nodemon 1.9.2

  在WS自带的终端输入nodemon server.js启动项目,报如下错误提示,服务能正常跑,但是无法监测文件修改。

[nodemon] Internal watch failed: watch ENOSPC

  解决办法是在终端输入如下命令,然后重新运行nodemon server.js。

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

  注意,在WS的终端执行Ctrl + C并不能结束node进程,从而导致下一次服务启动时端口被占用而失败。正确的方法是直接点击终端窗口旁边的红色小叉以结束掉当前会话。


本文转自Jaxu博客园博客,原文链接:http://www.cnblogs.com/jaxu/p/5568703.html,如需转载请自行联系原作者


相关文章
|
3月前
|
JavaScript Unix Linux
⨯ cannot execute cause=fork/exec...pnpm\bin\pnpm.cjs: %1 is not a valid Win32 application.
⨯ cannot execute cause=fork/exec...pnpm\bin\pnpm.cjs: %1 is not a valid Win32 application.
120 0
|
5月前
npm run dev启动报错:Error: Cannot find module 'semver'
npm run dev启动报错:Error: Cannot find module 'semver'
99 0
|
缓存 JavaScript
运行vue报错npm ERR! A complete log of this run can be found in解决办法
在这里我们需要清除npm的缓存: (1)在cmd命令行窗口中输入:npm cache clean --force (2)然后再运行我们需要安装模块的命令,输入npm install。 有时是网络问题,依赖包加载不完整,删掉node_modules文件后,重新执行npm install即可。
|
18天前
|
Kubernetes 网络协议 Perl
k8s Failed to create pod sandbox: open /run/systemd/resolve/resolv.conf: no such file or directory
k8s Failed to create pod sandbox: open /run/systemd/resolve/resolv.conf: no such file or directory
20 0
npm 启动报错 解决 events.js:174 throw er; // Unhandled 'error' event 的报错问题
npm 启动报错 解决 events.js:174 throw er; // Unhandled 'error' event 的报错问题
npm 启动报错 解决 events.js:174 throw er; // Unhandled 'error' event 的报错问题
|
4月前
|
资源调度 前端开发
npm/yarn link 测试包时报错 Warning: Invalid hook call. Hooks can only be called ...
npm/yarn link 测试包时报错 Warning: Invalid hook call. Hooks can only be called ...
37 0
|
4月前
|
资源调度 前端开发
Error_ watch path ENOSPC
Error_ watch path ENOSPC
|
5月前
|
JavaScript 前端开发 测试技术
npm run dev启动报错:TypeError: Cannot read property 'upgrade' of undefined
npm run dev启动报错:TypeError: Cannot read property 'upgrade' of undefined
97 0
|
9月前
|
资源调度 JavaScript
vue创建项目报:Error: command failed: yarn
vue创建项目报:Error: command failed: yarn
197 0
|
11月前
|
缓存 JavaScript Nacos
Vue 报错整理:npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\jinchuang\AppData...
我是在npm install的时候出现的这个问题,开始是安装不上,提示升级npm,然后我按要求升级npm i npm 依然报错 解决方法:1. 删除本地node_modules 依赖包2. 执行 npm cache clean --force 清理缓存3. npm install。
170 0