如何修复“ * .vue文件中的命名导出被忽略”错误?

时间:2019-06-11 21:00:44

标签: node.js vue.js vue-loader

我接管了一个由Vue开发的前端项目。 安装node.js模块后,任何尝试启动应用程序的尝试都会导致[vue-loader] src/client/forms/<form-name>.vue: named exports in *.vue files are ignored. 基本上,所有vue文件都会被vue-loader忽略。

我想重点是vue和vue-loader版本不匹配,但是尽管尝试了很多,但我仍无法弄清楚什么是正确的。 即使升级到最新版本也是不可行的,因为由于模块兼容性而引起了其他错误。

这是package.json内容:

  "dependencies": {
    "babel-runtime": "^6.0.0",
    "braintree-web": "^2.27.0",
    "config": "^1.21.0",
    "getmdl-select": "^1.0.4",
    "material-design-lite": "^1.1.3",
    "material-ui-vue": "^0.1.4",
    "moment": "^2.14.1",
    "moment-timezone": "^0.5.5",
    "vue": "^1.0.21",
    "vue-analytics": "^5.1.1",
    "vue-datepicker": "^1.2.1",
    "vue-form": "^0.3.1",
    "vue-ga": "^1.0.0",
    "vue-recaptcha": "0.0.2",
    "vue-resource": "^0.9.1",
    "vue-router": "^0.7.13",
    "vue-validator": "^2.1.3",
    "vuex": "^1.0.0-rc"
  },
  "devDependencies": {
    "eslint": "^2.13.1",
    "eslint-config-standard": "^5.3.1",
    "eslint-friendly-formatter": "^2.0.5",
    "eslint-loader": "^1.3.0",
    "eslint-plugin-html": "^1.5.1",
    "eslint-plugin-promise": "^1.0.8",
    "eslint-plugin-standard": "^1.3.2",
    "babel-core": "^6.0.0",
    "babel-loader": "^6.0.0",
    "babel-plugin-transform-runtime": "^6.0.0",
    "babel-preset-es2015": "^6.0.0",
    "babel-preset-stage-2": "^6.0.0",
    "cross-env": "^1.0.6",
    "css-loader": "^0.23.0",
    "file-loader": "^0.8.4",
    "json-loader": "^0.5.4",
    "url-loader": "^0.5.7",
    "vue-hot-reload-api": "^1.2.0",
    "vue-html-loader": "^1.0.0",
    "vue-loader": "^8.2.1",
    "vue-style-loader": "^1.0.0",
    "webpack": "^1.12.2",
    "webpack-dev-server": "^1.12.0"
  }

我在做什么错? 如何检查适用于该vue版本的正确vue-loader版本?

0 个答案:

没有答案