NPM run watch-poll 编译执行到 95%报 i/o 错误,错误信息如下

vagrant@homestead:~/Code/l_bbs$ npm run watch-poll
> @ watch-poll /home/vagrant/Code/l_bbs
> npm run watch -- --watch-poll
> @ watch /home/vagrant/Code/l_bbs
> npm run development -- --watch "--watch-poll"
> @ development /home/vagrant/Code/l_bbs
> node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch" "--watch-poll"
10% building 1/1 modules 0 active
webpack is watching the files…
95% emitting unnamed compat pluginError: EIO: i/o error, close
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: `node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch" "--watch-poll"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ development 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/vagrant/.npm/_logs/2019-09-25T04_22_53_018Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ watch: `npm run development -- --watch "--watch-poll"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ watch 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/vagrant/.npm/_logs/2019-09-25T04_22_53_038Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ watch-poll: `npm run watch -- --watch-poll`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ watch-poll 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/vagrant/.npm/_logs/2019-09-25T04_22_53_058Z-debug.log

之前是提示这个,

   Running: npm install vue-template-compiler --save-dev --production=false

我用yarn安装vue-template-compiler这个依赖后解决了问题,但是安装这个图标依赖之后,我用同样的方法结果出现了以上问题,没有找到原因,求解答。

附言 1  ·  4年前

更新:此处虽然报错,但是刷新页面后发现,可以编译成功,但是报错导致无法监听。

附言 2  ·  4年前

上面的错了,我又重来了一遍,哪个是安装这个图标的上一步,到这里之后还是这个错误。我是真的没办法了,求大佬帮帮我

《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
最佳答案

问答:[已解决] 关于 执行 NPM run watch-poll 后出现 95% emittingError:...

找了很久最终发现是 homestead.yaml 中配置了 type:nfs 问题

你看看是不是

4年前 评论
dryang (楼主) 4年前
dryang (楼主) 4年前
mengling2012 3年前
讨论数量: 4

补充:
执行yarn install后,会产生如下错误

error An unexpected error occurred: "EIO: i/o error, symlink '../../../parser/bin/babel-parser.js' -> '/home/vagrant/Code/larabbs/node_modules/@babel/core/node_modules/.bin/parser'".

有时候不管这个也能正常运行,不知道怎么解决

4年前 评论

再补充:

vagrant@homestead:~/Code/larabbs$ npm run watch-poll
> @ watch-poll /home/vagrant/Code/larabbs
> npm run watch -- --watch-poll
> @ watch /home/vagrant/Code/larabbs
> npm run development -- --watch "--watch-poll"
> @ development /home/vagrant/Code/larabbs
> NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch" "--watch-poll"
        Additional dependencies must be installed. This will only take a moment.
        Running: npm install vue-template-compiler --save-dev --production=false

到这里会卡住,让他安装个几分钟之后会报错

npm ERR! path ../jsesc/bin/jsesc
npm ERR! code EIO
npm ERR! errno -5
npm ERR! syscall symlink
npm ERR! EIO: i/o error, symlink '../jsesc/bin/jsesc' -> '/home/vagrant/Code/larabbs/node_modules/@babel/generator/node_modules/.bin/jsesc'
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/vagrant/.npm/_logs/2019-09-25T06_52_07_138Z-debug.log
/home/vagrant/Code/larabbs/node_modules/webpack-cli/bin/cli.js:93
                                throw err;

然后用yarn安装上面的依赖,再次执行watch-poll,就能成功

4年前 评论

问答:[已解决] 关于 执行 NPM run watch-poll 后出现 95% emittingError:...

找了很久最终发现是 homestead.yaml 中配置了 type:nfs 问题

你看看是不是

4年前 评论
dryang (楼主) 4年前
dryang (楼主) 4年前
mengling2012 3年前

95%时出现错误,一般直接重启一下电脑,重新执行一下就可以了!我试过了不下10次都直接解决此问题!

3年前 评论
dryang (楼主) 3年前

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!