Vue套件版本与Laravel不匹配

时间:2020-08-19 11:16:59

标签: vue.js laravel-5 npm

我遇到了麻烦,需要您的帮助。这是我的 package.json 文件

"dependencies": {
...
"vue": "^2.6.11",
"vue-template-compiler": "^2.6.11",
...
}

,当您执行npm install时,我检查了 node_modules 文件夹中的vue和vue-template-compiler软件包,它们的版本相同(2.6.11)。但是,这是我的问题,当我加载网站时出现以下错误消息:

错误:模块构建失败:
错误: Vue软件包版本不匹配:

-vue@2.6.11
-vue-template-compiler@2.5.2

这可能导致事情无法正常运行。确保两者使用相同的版本。 如果您使用的是vue-loader @> = 10.0,只需更新vue-template-compiler。 如果您使用的是vue-loader @ <10.0或vueify,则重新安装vue-loader / vueify会将vue-template-compiler升级到最新版本。

因此,我检查了 node_modules 中具有的 vue-loader 的版本,并且该版本的版本高于10.0,因此我执行了npm update vue-template-compiler在错误消息中说,但没有进行任何更改(因为在我的 node_modules 文件夹中,我的版本正确)。

我在NPMJS site中检查了vue-template-compiler的当前版本,并且是2.6.11,就像当前的vue版本一样。

我尝试删除 node_modules 文件夹并使用npm install重新安装,我尝试删除 node_modules 文件夹+ package-lock.json 文件并重新安装,我尝试执行npm update,然后重新安装,我删除了浏览器的缓存。我尝试了所有发现的与问题有关的内容,但没有任何效果。所以我在这里,如果有人知道会发生什么,请帮忙,我不知道该怎么办了。我正在使用Laravel 5.5。

0 个答案:

没有答案