[英]How can I set up Vue.js in my Laravel Project ?
I work with Laravel and I try to do something with Vue.js but I can't see it up. 我使用Laravel,尝试使用Vue.js进行操作,但我看不到它。
First of all I install Node.js and npm. 首先,我安装Node.js和npm。 Now I'm trying to user 'npm run watch'.
现在,我正在尝试使用'npm run watch'用户。 To see if my js code runs on my laravel project.
看看我的js代码是否在我的laravel项目上运行。
But, when I type 'npm run watch' in my cmd. 但是,当我在cmd中键入“ npm run watch”时。 It's like this:
就像这样:
What should I do ? 我该怎么办 ?
Thanks ! 谢谢 !
It looks like your version of Laravel Mix is out-of-date; 您的Laravel Mix版本似乎已经过时; there was a bug fixed in March 2017 that addressed this issue on newer versions of webpack.
2017年3月修复了一个错误 ,此错误在较新版本的webpack上得以解决。
You can update your version of Laravel Mix by either doing this: 您可以执行以下任一操作来更新Laravel Mix的版本:
npm uninstall laravel-mix && npm install --save-dev laravel-mix
or updating your package.json
file to change the version for laravel-mix
或更新您的
package.json
文件以更改laravel-mix
的版本
...
"devDependencies": {
...
"laravel-mix": "^0.11.4",
...
}
...
After changing the version number, run npm update
. 更改版本号后,运行
npm update
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.