cross-env vue的版本
laravel
npm run dev 报错 spawn ENOENT
方法:npm install cross-env
继续报新的错误
Vue packages version mismatch:
- vue@2.4.4
- vue-template-compiler@2.5.2
This may cause things to work incorrectly. Make sure to use the same version for both.
If you are using vue-loader@>=10.0, simply update vue-template-compiler.
If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
方法:npm install vue-loader
+ vue-loader@13.3.0 会自动被加入package.json的dependencies
npm install vue-template-compiler
+ vue-template-compiler@2.5.9
再跑npm run dev,看看有什么问题
哎呀还是同样的错误
把vue-template-compiler的版本改成和vue的版本一样
"vue": "2.4.4"
vue-template-compiler": "2.4.4"
npm update vue-template-compiler
终于可以了
DONECompiled successfully in 11139ms22:33:23
npm run dev:
cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js