Error_ watch path ENOSPC

简介: Error_ watch path ENOSPC

Ubuntu18.04yarn servenodeENOSPC

Ubuntu18.04 前端工程目录下运行 yarn serve 出现如下错误

w@w:~/my/project$ yarn serve
yarn run v1.13.0
$ vue-cli-service serve
 INFO  Starting development server...
 10% building 1/1 modules 0 activeevents.js:183
      throw er; // Unhandled 'error' event
      ^
Error: watch /home/w/my/project/public ENOSPC
    at _errnoException (util.js:1022:11)
    at FSWatcher.start (fs.js:1382:19)
    at Object.fs.watch (fs.js:1408:11)
    at createFsWatchInstance (/home/w/my/project/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/w/my/project/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/w/my/project/node_modules/chokidar/lib/nodefs-handler.js:232:14)
    at FSWatcher.NodeFsHandler._handleDir (/home/w/my/project/node_modules/chokidar/lib/nodefs-handler.js:414:19)
    at FSWatcher.<anonymous> (/home/w/my/project/node_modules/chokidar/lib/nodefs-handler.js:462:19)
    at FSWatcher.<anonymous> (/home/w/my/project/node_modules/chokidar/lib/nodefs-handler.js:467:16)
    at FSReqWrap.oncomplete (fs.js:153:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

ENOSPC& No space left on the device.

ENOSPC:设备上没有剩余空间。

终端输入 df -h 命令查询系统磁盘信息,发现磁盘可用空间还是很多的.

通过 Google 发现这是由于 inotify 的默认值设置导致出现的上面问题,修改默认值即可

终端执行如下两个命令,调整 inotify 监听的目录数量

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

解决方案来源:github.com/guard/liste…

目录
相关文章
|
7月前
|
JavaScript 小程序 前端开发
[Vue warn]: Error in callback for watcher “fileList“: “TypeError: Cannot create property ‘uid‘ on st
[Vue warn]: Error in callback for watcher “fileList“: “TypeError: Cannot create property ‘uid‘ on st
164 0
成功解决:Error in created hook: “ReferenceError: params is not defined“
该博客文章描述了作者解决"ReferenceError: params is not defined"错误的过程,原因是路由传递的params参数与调用方法中的参数名称冲突,最终通过检查接口参数解决了问题。
成功解决:Error in created hook: “ReferenceError: params is not defined“
|
5月前
|
前端开发
Error in created hook: “TypeError: _test.default is not a function
Error in created hook: “TypeError: _test.default is not a function
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 的报错问题
|
消息中间件
failed to open log file at ‘/var/log/rabbitmq/rabbit@9f987b50c687_upgrade.log‘, reason: permission d
failed to open log file at ‘/var/log/rabbitmq/rabbit@9f987b50c687_upgrade.log‘, reason: permission d
310 0
|
7月前
|
JavaScript 前端开发
[Vue warn]: Error in v-on handler (Promise/async): “NavigationDuplicated: Navigating to current loca
[Vue warn]: Error in v-on handler (Promise/async): “NavigationDuplicated: Navigating to current loca
194 0
|
编译器 Serverless Go
Fail to start function, Code:1
Fail to start function, Code:1
66 2
|
JavaScript
[Vue warn] Error in callback for immediate watcher “data“ “TypeError Cannot read property ‘reduce
[Vue warn] Error in callback for immediate watcher “data“ “TypeError Cannot read property ‘reduce
404 0
|
JavaScript
[Vue warn]: Error in mounted hook: “TypeError: handler.call is not a function“
[Vue warn]: Error in mounted hook: “TypeError: handler.call is not a function“
292 0
[Vue warn]: Error in mounted hook: “TypeError: handler.call is not a function“
|
JavaScript
[Vue warn]: Duplicate keys detected: ‘0‘. This may cause an update error.
首先Duplicate keys detected: '0'. This may cause an update error是vue发现key不是唯一的而引发的错误. 译为中文大概是 : 检测到重复键 : '0'. '0'可能会导致一个更新错误. 解决办法网上找的其他也有一些.通过手动进行修改:key进而解决,比如说进行拼接字符串.因为为了解决不报错,而手动修改了数据.个人感觉不应该是这样的.
279 0
[Vue warn]: Duplicate keys detected: ‘0‘. This may cause an update error.