运行完yarn指令后运行npm run watch-poll指令提示mix not found
运行yarn install:
vagrant@homestead:~/code/larabbs$ yarn install --no-bin-links
yarn install v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.3.2: The platform "linux" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.13: The platform "linux" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > sass-loader@8.0.2" has unmet peer dependency "webpack@^4.36.0 || ^5.0.0".
[4/4] Building fresh packages...
Done in 31.24s.
个人猜测这一步好像是没有问题的,然后运行了npm run watch-poll
vagrant@homestead:~/code/larabbs$ npm run watch-poll
> @ watch-poll /home/vagrant/code/larabbs
> mix watch -- --watch-options-poll=1000
sh: 1: mix: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! @ watch-poll: `mix watch -- --watch-options-poll=1000`
npm ERR! spawn ENOENT
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/2021-02-12T05_38_33_048Z-debug.log
然后出现了以上报错,网上搜索了一番虽然也有npm run watch-poll后报错的,但似乎没有出现mix not found这样错误的,删除node_modules的方法也试过没有作用,请教一下这个错误出现的原因是什么,该如何解决
推荐文章: