vue npm run dev启动报错
程序员文章站
2022-05-13 19:31:27
...
> [email protected] dev /home/haibin/WebstormProjects/vueProject/tabbar
> vue-cli-service serve
INFO Starting development server...
10% building 2/2 modules 0 activeevents.js:174
throw er; // Unhandled 'error' event
^
Error: ENOSPC: System limit for number of file watchers reached, watch '/home/haibin/WebstormProjects/vueProject/tabbar/public'
at FSWatcher.start (internal/fs/watchers.js:165:26)
at Object.watch (fs.js:1258:11)
at createFsWatchInstance (/home/haibin/WebstormProjects/vueProject/tabbar/node_modules/chokidar/lib/nodefs-handler.js:38:15)
at setFsWatchListener (/home/haibin/WebstormProjects/vueProject/tabbar/node_modules/chokidar/lib/nodefs-handler.js:81:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/haibin/WebstormProjects/vueProject/tabbar/node_modules/chokidar/lib/nodefs-handler.js:233:14)
at FSWatcher.NodeFsHandler._handleDir (/home/haibin/WebstormProjects/vueProject/tabbar/node_modules/chokidar/lib/nodefs-handler.js:429:19)
at FSWatcher.<anonymous> (/home/haibin/WebstormProjects/vueProject/tabbar/node_modules/chokidar/lib/nodefs-handler.js:477:19)
at FSWatcher.<anonymous> (/home/haibin/WebstormProjects/vueProject/tabbar/node_modules/chokidar/lib/nodefs-handler.js:482:16)
at FSReqWrap.oncomplete (fs.js:154:5)
Emitted 'error' event at:
at FSWatcher._handleError (/home/haibin/WebstormProjects/vueProject/tabbar/node_modules/chokidar/index.js:260:10)
at createFsWatchInstance (/home/haibin/WebstormProjects/vueProject/tabbar/node_modules/chokidar/lib/nodefs-handler.js:40:5)
at setFsWatchListener (/home/haibin/WebstormProjects/vueProject/tabbar/node_modules/chokidar/lib/nodefs-handler.js:81:15)
[... lines matching original stack trace ...]
at FSReqWrap.oncomplete (fs.js:154:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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/haibin/.npm/_logs/2019-10-28T12_07_46_419Z-debug.log
1.删除node_modules
npm install
2.关闭编辑器,从新打开项目再重新
npm run dev
如果报错不是这种
可以查看package.json的scripts启动条件是dev还是serve
上一篇: Oracle中dual表
下一篇: 微信公众平台开发(73) 发送客服消息
推荐阅读
-
关于vue的npm run dev和npm run build的区别介绍
-
基于vue-cli npm run build之后vendor.js文件过大的解决方法
-
vue中Npm run build 根据环境传递参数方法来打包不同域名
-
vue踩坑记-在项目中安装依赖模块npm install报错
-
Vue -- vue-cli(vue脚手架) npm run build打包优化
-
vue 动态设置img的src地址无效,npm run build 后找不到文件的解决
-
npm run dev的错误
-
关于vue的npm run dev和npm run build的区别介绍
-
npm run dev 报错 ERROR in Entry module not found: Error: Can't resolve './src' in
-
项目运行npm run dev浏览器始终报cannot get /