enospc android,npm 运行项目报磁盘空间不足 ENOSPC

在自己的Ubuntu 上运行一段时间npm 就报错:

Error: ENOSPC: no space left on device, watch '/mysoft/www/vue-element-admin/public'

at FSWatcher.start (fs.js:1375:26)

at Object.fs.watch (fs.js:1412:11)

at createFsWatchInstance (/mysoft/www/vue-element-admin/node_modules/chokidar/lib/nodefs-handler.js:38:15)

at setFsWatchListener (/mysoft/www/vue-element-admin/node_modules/chokidar/lib/nodefs-handler.js:81:15)

at FSWatcher.NodeFsHandler._watchWithNodeFs (/mysoft/www/vue-element-admin/node_modules/chokidar/lib/nodefs-handler.js:233:14)

at FSWatcher.NodeFsHandler._handleDir (/mysoft/www/vue-element-admin/node_modules/chokidar/lib/nodefs-handler.js:429:19)

at FSWatcher. (/mysoft/www/vue-element-admin/node_modules/chokidar/lib/nodefs-handler.js:477:19)

at FSWatcher. (/mysoft/www/vue-element-admin/node_modules/chokidar/lib/nodefs-handler.js:482:16)

at FSReqWrap.oncomplete (fs.js:150:5)

Emitted 'error' event at:

at FSWatcher._handleError (/mysoft/www/vue-element-admin/node_modules/chokidar/index.js:260:10)

at createFsWatchInstance (/mysoft/www/vue-element-admin/node_modules/chokidar/lib/nodefs-handler.js:40:5)

at setFsWatchListener (/mysoft/www/vue-element-admin/node_modules/chokidar/lib/nodefs-handler.js:81:15)

[... lines matching original stack trace ...]

at FSReqWrap.oncomplete (fs.js:150:5)

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! vue-element-admin@4.0.1 dev: `vue-cli-service serve`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the vue-element-admin@4.0.1 dev script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

npm ERR! /home/xiaoduc/.npm/_logs/2019-06-23T13_09_22_007Z-debug.log

查看了磁盘空间都是很足的哇

终于在stackoverflow 上找到原因

解决办法

查看目前的最大值

To find your current limit, type this in your terminal:

$cat /proc/sys/fs/inotify/max_user_watches

增加最大值

Which is typically 8192 by default.

To increase your limit, type this:

$sudo sysctl fs.inotify.max_user_watches=16384

永久设置最大值

Then restart django.

To permanently set this limit, type this:

$echo 16384 | sudo tee -a /proc/sys/fs/inotify/max_user_watches

华裳绕指柔, 版权所有丨如未注明 , 均为原创|转载请注明npm 运行项目报磁盘空间不足 ENOSPC!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值