0

すべてが素晴らしく、ダンディでした。次に、Vue および Vue-template-compiler npm パッケージを 2.1.4 より上の両方のバージョンにアップグレードしましたが、次のエラー以外はブラウザーに何も表示されません。

(unknown) [Vue warn]: Error when rendering root instance: warn

localhost/:2961 Uncaught ReferenceError: _h is not defined
    at Proxy.render (eval at <anonymous> (http://localhost:8080/js/app.js:1509:1), <anonymous>:1096:14)
    at Vue$2.Vue._render (eval at <anonymous> (http://localhost:8080/js/app.js:794:1), <anonymous>:2952:22)
    at Vue$2.eval (eval at <anonymous> (http://localhost:8080/js/app.js:794:1), <anonymous>:2189:21)
    at Watcher.get (eval at <anonymous> (http://localhost:8080/js/app.js:794:1), <anonymous>:1652:27)
    at new Watcher (eval at <anonymous> (http://localhost:8080/js/app.js:794:1), <anonymous>:1644:12)
    at Vue$2.Vue._mount (eval at <anonymous> (http://localhost:8080/js/app.js:794:1), <anonymous>:2188:19)
    at Vue$2.$mount (eval at <anonymous> (http://localhost:8080/js/app.js:794:1), <anonymous>:5978:15)
    at install$2 (eval at <anonymous> (http://localhost:8080/js/app.js:1509:1), <anonymous>:1223:29)
    at Object.install$$1 [as install] (eval at <anonymous> (http://localhost:8080/js/app.js:1509:1), <anonymous>:6265:3)
    at Function.Vue.use (eval at <anonymous> (http://localhost:8080/js/app.js:794:1), <anonymous>:3364:22)

私のpackage.json:

{
  "name": "myapp",
  "version": "0.0.1",
},
  "dependencies": {
    "babel-runtime": "^6.20.0",
    "fastclick": "^1.0.6",
    "material-design-icons": "^3.0.1",
    "moment": "^2.17.1",
    "quasar-framework": "^0.9.1",
    "roboto-fontface": "^0.6.0",
    "velocity-animate": "^1.3.1",
    "vue": "2.1.4",
    "vue-router": "^2.1.1"
  },
  "devDependencies": {
    "autoprefixer": "^6.5.3",
    "babel-core": "^6.20.0",
    "babel-eslint": "^7.1.1",
    "babel-loader": "^6.2.9",
    "babel-plugin-transform-runtime": "^6.15.0",
    "babel-preset-es2015": "^6.18.0",
    "babel-preset-stage-2": "^6.18.0",
    "colors": "^1.1.2",
    "connect-history-api-fallback": "^1.3.0",
    "css-loader": "^0.26.1",
    "eslint": "^3.11.1",
    "eslint-config-standard": "^6.2.1",
    "eslint-friendly-formatter": "^2.0.6",
    "eslint-loader": "^1.6.1",
    "eslint-plugin-html": "^1.7.0",
    "eslint-plugin-promise": "^3.4.0",
    "eslint-plugin-standard": "^2.0.1",
    "eventsource-polyfill": "^0.9.6",
    "express": "^4.14.0",
    "extract-text-webpack-plugin": "^2.0.0-beta.4",
    "file-loader": "^0.9.0",
    "function-bind": "^1.1.0",
    "html-webpack-plugin": "^2.24.1",
    "http-proxy-middleware": "^0.17.3",
    "json-loader": "^0.5.4",
    "postcss-loader": "^1.2.0",
    "stylus": "^0.54.5",
    "stylus-loader": "^2.4.0",
    "url-loader": "^0.5.7",
    "vue-loader": "^10.0.2",
    "vue-html-loader": "^1.2.3",
    "vue-style-loader": "^1.0.0",
    "vue-template-compiler": "2.1.4",
    "chai": "^3.5.0",
    "karma": "^1.3.0",
    "karma-coverage": "^1.1.1",
    "karma-mocha": "^1.3.0",
    "karma-sinon-chai": "^1.2.4",
    "karma-spec-reporter": "^0.0.26",
    "karma-webpack": "^1.8.0",
    "karma-chrome-launcher": "^2.0.0",
    "karma-firefox-launcher": "^1.0.0",
    "karma-ie-launcher": "^1.0.0",
    "karma-phantomjs-launcher": "^1.0.1",
    "karma-safari-launcher": "^1.0.0",
    "karma-sauce-launcher": "^1.0.0",
    "karma-sourcemap-loader": "^0.3.7",
    "phantomjs-prebuilt": "^2.1.13",
    "sinon": "^1.17.6",
    "sinon-chai": "^2.8.0",
    "lolex": "^1.5.2",
    "mocha": "^3.2.0",
    "inject-loader": "^2.0.1",
    "isparta-loader": "^2.0.0",
    "chromedriver": "^2.25.2",
    "cross-spawn": "^4.0.2",
    "nightwatch": "^0.9.9",
    "selenium-server": "^2.53.1",
    "semver": "^5.3.0",
    "opn": "^4.0.2",
    "ora": "^0.3.0",
    "shelljs": "^0.7.4",
    "webpack": "^2.1.0-beta.27",
    "webpack-dev-middleware": "^1.8.4",
    "webpack-hot-middleware": "^2.13.2",
    "webpack-merge": "^0.18.0"
  }
}

両方をバージョン 2.1.4 に戻すと、すべてが正常に戻ります... Vue と Vue-template-compiler を正常に更新するにはどうすればよいですか?

4

2 に答える 2

0

ここで提起されているように、同じ問題のようです。にアップグレードvue-template-compilerする必要があります2.2.0。これで修正されるはずです。

于 2016-12-21T12:18:17.273 に答える