Laravel 6.x 执行 NPM run watch-poll 报错 [已解决]
尝试用 Laravel 5.8 的方法直接操作过,说找不到 node_modules,因为之前删除了。
之后我删除分支重新再建分支再来,不再删除 node_modules ,按教程走,于是报以下错。
win 10 \ Homestead
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ watch: `NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--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-10-03T11_55_01_147Z-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-10-03T11_55_01_189Z-debug.log
➜ weibo git:(filling-layout-style) ✗

这下,不知又要在这块折腾多久了。
关于 LearnKu
问题还没解决。我用全新的项目再试,还是同样的结果。

以下是安装过程,没有删除 node_modules :
看来还是环境的问题,我尝试安装 5.8 版本的 laravel 项目,执行 $ npm run watch-poll 还是出现同样的问题。
被迫升级 Vagrant \ Virtual Box 到最新版本之前,5.8 版本的项目 能顺利执行 npm run watch-poll.
现在我又开始倒腾环境,不知何时是个头。。。。。。。。。。。
建议直接在windows 下安装最新版的 node.js ,然后使用 npm install & npm run dev。
问题已解决。
编辑资源 Mix
环境(此刻全新最新,非教程里的):
win 10 专业版
node-v12.11.1-x64
VirtualBox-6.0.12-133076-Win
vagrant_2.2.5_x86_64
version": "8.2.1"
laravel 6.x
就这样就OK了。

@bing_ 感谢老哥!! 有效