(env) [root@VM-20-16-centos vue_test2]# npm run serve
> [email protected] serve
> vue-cli-service serve
INFO Starting development server...
[10%] building (0/0 modules)
node:internal/errors:464
ErrorCaptureStackTrace(err);
^
Error: ENOSPC: System limit for number of file watchers reached, watch '/root/work/vue3/vue_test2/public'
at FSWatcher.<computed> (node:internal/fs/watchers:244:19)
at Object.watch (node:fs:2251:34)
at createFsWatchInstance (/root/work/vue3/vue_test2/node_modules/chokidar/lib/nodefs-handler.js:119:15)
at setFsWatchListener (/root/work/vue3/vue_test2/node_modules/chokidar/lib/nodefs-handler.js:166:15)
at NodeFsHandler._watchWithNodeFs (/root/work/vue3/vue_test2/node_modules/chokidar/lib/nodefs-handler.js:331:14)
at NodeFsHandler._handleDir (/root/work/vue3/vue_test2/node_modules/chokidar/lib/nodefs-handler.js:567:19)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async NodeFsHandler._addToNodeFs (/root/work/vue3/vue_test2/node_modules/chokidar/lib/nodefs-handler.js:617:16)
at async /root/work/vue3/vue_test2/node_modules/chokidar/index.js:451:21
at async Promise.all (index 0)
Emitted 'error' event on FSWatcher instance at:
at FSWatcher._handleError (/root/work/vue3/vue_test2/node_modules/chokidar/index.js:647:10)
at NodeFsHandler._addToNodeFs (/root/work/vue3/vue_test2/node_modules/chokidar/lib/nodefs-handler.js:645:18)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /root/work/vue3/vue_test2/node_modules/chokidar/index.js:451:21
at async Promise.all (index 0) {
errno: -28,
syscall: 'watch',
code: 'ENOSPC',
path: '/root/work/vue3/vue_test2/public',
filename: '/root/work/vue3/vue_test2/public'
}
Solution:
Execute the following command
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
Read More:
- [Solved] vue3vite Error: Failed to resolve import “@vue/server-renderer from “src\App.vue“. Does the file exist
- [Solved] Temporary error: Error: spawn E:\vue3-vite\my-app\node_modules\esbuild\esbuild.exe ENOENT
- [Solved] Error spawn CMD enoent errno when starting Vue project: – 4058
- Yarn vue3 modify the name of the source file Error [Solved]
- [Solved] VUE npm install Error: Module build failed: Error: ENOENT: no such file or directory, scandir
- Vue2.0: How to Use vue3 api to encapsulate Axios
- [Solved] NPM Error: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed
- Vue warn]: vue3 element Component emit Pass Event Error
- [Solved] Vue Error: Parsing error: No Babel config file detected for /Users/Usename/xxx…
- How to Solve Vscode save Vue file eslint error
- [Solved] vue watch Error: Error in callback for watcher “xxx“: “TypeError: Cannot read properties of undefined …
- [Solved] Vue Error: Parsing error: No Babel config file detected for
- [Solved] Vue Error: Uncaught TypeError: Vue.createApp is not a function
- [Weex]Error in creating project NPM: unable to load file D:\program files\nodejs\node_ global\ weex.ps1 Because scripts are not allowed to run on this system.
- Full screen scrolling by Vue + Vue awesomeswiper
- [Solved] Vue Route Error: Uncaught TypeError: (0 , vue__WEBPACK_IMPORTED_MODULE_42__.defineComponent) is not a function
- [Solved] Ineffective mark-compacts near heap limit Allocation failed – JavaScript heap out of memory
- [Solved] Vue Error: Parsing error:No Babel config file detected for xxx
- Use of $watch in Vue (solve rangeerror: maximum call stack size exceeded)
- Solution to some map files in JS folder after Vue packaging (remove the map. JS file)