首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何解决Vue包版本与vue加载程序不匹配的问题?

如何解决Vue包版本与vue加载程序不匹配的问题?
EN

Stack Overflow用户
提问于 2021-06-07 10:52:35
回答 1查看 2.3K关注 0票数 2

我正在尝试将Vue文件筛选器安装到我的package.json上。但是,当我试图使用npm installnpm run dev安装软件包时,我会得到以下错误:

代码语言:javascript
复制
ERROR in ./resources/assets/js/file-manager/FileManager.vue
Module Error (from ./node_modules/vue-loader/lib/index.js):


Vue packages version mismatch:

- vue@2.6.10 (/var/www/node_modules/vue/dist/vue.runtime.common.js)
- vue-template-compiler@2.6.14 (/var/www/node_modules/vue-template-compiler/package.json)

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.

我安装了vue-加载程序7.11.2 (这是一个精益项目)。我没有找到任何说明如何重新安装vue-加载程序,但升级vue模板编译器没有工作。

我还尝试了以下解决方案:

这是我的package.json

代码语言:javascript
复制
{
  "private": true,
  "scripts": {
    "dev": "npm run development",
    "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch": "cross-env 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 run watch -- --watch-poll",
    "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
    "prod": "npm run production",
    "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
  },
  "devDependencies": {
    "axios": "^0.19.0",
    "bootstrap-sass": "^3.4.1",
    "cross-env": "^5.2.1",
    "font-awesome": "^4.7.0",
    "jquery": "^3.4.1",
    "laravel-mix": "^5.0.0",
    "lodash": "^4.17.15",
    "resolve-url-loader": "^3.1.0",
    "sass": "^1.23.0",
    "sass-loader": "^8.0.0",
    "vue": "2.6.10",
    "vue-template-compiler": "^2.6.14"
  },
  "dependencies": {
    "ajv": "^6.10.2",
    "animate.css": "^3.7.2",
    "bloodhound-js": "^1.2.3",
    "bootstrap": "^3.4.1",
    "bootstrap-editable": "^1.0.1",
    "bootstrap-sweetalert": "^1.0.1",
    "bootstrap-switch": "^3.4.0",
    "bourbon": "^5.1.0",
    "clipboard": "^1.7.1",
    "codemirror": "^5.49.0",
    "d3": "^4.12.0",
    "daterangepicker": "^2.1.27",
    "dropzone": "^5.5.1",
    "echarts": "^3.8.5",
    "express": "^4.17.1",
    "flag-icon-css": "^2.9.0",
    "flat-social-icons": "0.0.1",
    "flipclock": "^0.8.2",
    "formatter": "^0.4.1",
    "google-maps": "^3.3.0",
    "intro.js": "^2.9.3",
    "jquery-countdown": "^2.2.0",
    "jquery-locationpicker": "^0.1.12",
    "jquery-ui": "^1.12.1",
    "jstree": "^3.3.8",
    "ladda": "^1.0.5",
    "laravel-file-manager": "~2.5.4",
    "moment": "^2.24.0",
    "nodejs-latest": "^1.1.0",
    "orgchart": "^2.1.7",
    "page-scroll-to-id": "^1.6.3",
    "parsleyjs": "^2.9.1",
    "plyr": "~3.6.5",
    "pnotify": "^3.2.1",
    "print-this": "^1.15.1",
    "sharer.js": "^0.3.8",
    "spin": "0.0.1",
    "summernote": "^0.8.12",
    "sweetalert": "^2.1.2",
    "sweetalert2": "^8.18.1",
    "switchery": "0.0.2",
    "typeahead": "^0.2.2",
    "vue-axios": "^2.1.5",
    "vue-router": "^3.1.3",
    "vuex": "^3.6.2",
    "webui-popover": "^1.2.18",
    "wowjs": "^1.1.3",
    "x-editable": "^1.5.1"
  }
}

有什么办法解决这个问题吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-06-07 11:41:20

vuevue-template-compiler必须具有相同的版本号。这一次也让我有些紧张。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67870284

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档