0

Everything was fine and dandy. Then I upgraded Vue and Vue-template-compiler npm packages to versions for both above 2.1.4 and then nothing shows in my browser except following error:

(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)

My 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"
  }
}

going back for both to version 2.1.4 and everything is fine again... How can I succesfully update Vue and Vue-template-compiler?

4

2 回答 2

1

There has been a renaming of a method in vue: https://github.com/vuejs/vue/commit/4b51ad048306367a6fb6fbee7445e086d855f31e

Your code or your dependencies might still use _h. In my case it relates to Quasar Framework. After updating to Quasar Framework 10.3 and vue 2.1.6 with vue-template-compiler 2.1.6 it is solved. See: https://github.com/quasarframework/app-template-default/issues/5

Browsing through github searching on _h and vue brought me there.

于 2016-12-21T15:31:09.287 回答
0

It seems like same issue, as has been raised here. You should upgrade vue-template-compiler to 2.2.0, which should fix it.

于 2016-12-21T12:18:17.273 回答