INFO Starting development server... [10%] building (0/0 modules) node:internal/errors:464 ErrorCaptureStackTrace(err); ^
Error: ENOSPC: System limitfor number of file watchers reached, watch '/home/coder/code-prac/crawlerSchedule/crawler/public' at FSWatcher.<computed> (node:internal/fs/watchers:244:19) at Object.watch (node:fs:2249:34) at createFsWatchInstance (/home/coder/code-prac/crawlerSchedule/crawler/node_modules/chokidar/lib/nodefs-handler.js:119:15) at setFsWatchListener (/home/coder/code-prac/crawlerSchedule/crawler/node_modules/chokidar/lib/nodefs-handler.js:166:15) at NodeFsHandler._watchWithNodeFs (/home/coder/code-prac/crawlerSchedule/crawler/node_modules/chokidar/lib/nodefs-handler.js:331:14) at NodeFsHandler._handleDir (/home/coder/code-prac/crawlerSchedule/crawler/node_modules/chokidar/lib/nodefs-handler.js:567:19) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async NodeFsHandler._addToNodeFs (/home/coder/code-prac/crawlerSchedule/crawler/node_modules/chokidar/lib/nodefs-handler.js:617:16) at async /home/coder/code-prac/crawlerSchedule/crawler/node_modules/chokidar/index.js:451:21 at async Promise.all (index 0) Emitted 'error' event on FSWatcher instance at: at FSWatcher._handleError (/home/coder/code-prac/crawlerSchedule/crawler/node_modules/chokidar/index.js:647:10) at NodeFsHandler._addToNodeFs (/home/coder/code-prac/crawlerSchedule/crawler/node_modules/chokidar/lib/nodefs-handler.js:645:18) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async /home/coder/code-prac/crawlerSchedule/crawler/node_modules/chokidar/index.js:451:21 at async Promise.all (index 0) { errno: -28, syscall: 'watch', code: 'ENOSPC', path: '/home/coder/code-prac/crawlerSchedule/crawler/public', filename: '/home/coder/code-prac/crawlerSchedule/crawler/public' }
Error: ENOSPC: System limit for number of file watchers reached, watch'所在文件路径'
vue工程在 deepin15.11 系统环境中运行 npm run serve命令时出现如下错误:
解决方案 在终端按顺序执行下面两个命令即可解决问题
1 2 3
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p