2016-12-21 1 views
0

모든 것이 훌륭하고 멋쟁이였습니다. 그럼 2.1.4 위 모두 버전의 뷰와 뷰 템플릿 컴파일러 NPM 패키지를 업그레이드 한 후 아무것도 다음과 같은 오류를 제외한 브라우저에서 보여줍니다 :Vue 및 Vue 템플릿 컴파일러 버전> 브라우저에서 "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 템플릿 컴파일러를 성공적으로 업데이트 할 수 있습니까?

+0

node_modules 폴더를 삭제하고 package.json의 업데이트 된 버전으로 다시'npm install'을 시도해 보셨습니까? – Saurabh

+0

예, 그랬습니다. 실제로 몇 번. – musicformellons

+0

'package.json' 파일을 여기에 추가 할 수 있습니까? vue-loader도 업그레이드하십시오. – Saurabh

답변

1

VUE에서 방법의 이름 바꾸기가 발생했습니다 : https://github.com/vuejs/vue/commit/4b51ad048306367a6fb6fbee7445e086d855f31e

귀하의 코드 또는 의존성은 여전히 ​​_h 사용할 수 있습니다. 제 경우에는 Quasar Framework와 관련이 있습니다. vue-template-compiler 2.1.6으로 Quasar Framework 10.3과 vue 2.1.6으로 업데이트 한 후 해결되었습니다. 참조 : https://github.com/quasarframework/app-template-default/issues/5

_h에서 검색하는 github 검색 및 vue에서 나를 데려 왔습니다.

0

제기 된 것과 동일한 문제인 것 같습니다. here. vue-template-compiler2.2.0으로 업그레이드해야하며이를 수정해야합니다.

+0

실제로 매우 비슷하게 보입니다! "vue-template-compiler": "^ 2.1.6"과 "vue": "^ 2.1.5"'를 사용하여 시도했지만 samer 오류가 발생했습니다. 또한''vue-template-compiler ":"^ 2.2.0 "'을 시도했지만 수정 버전 2.2.0을 의미합니다 ... – musicformellons