【发布时间】:2017-10-29 10:42:56
【问题描述】:
我从 vue-class-component 示例目录 (https://github.com/nuxt/nuxt.js/tree/dev/examples/vue-class-component) 复制粘贴了示例代码,并在最新的 nuxt 中出现此错误
Nuxt.js Error:
TypeError: Cannot read property '_init' of undefined
at VueComponent (/Users/piyushchauhan/Documents/testcodes/nuxt-component/node_modules/vue/dist/vue.runtime.common.js:4167:11)
at server-bundle.js:2252:17
at F (~/core-js/library/modules/_export.js:35:0)
at server-bundle.js:2247:22
at Array.map (native)
at Object._callee$ (.nuxt/server.js:53:65)
at tryCatch (~/regenerator-runtime/runtime.js:65:14)
at Generator.invoke [as _invoke] (~/regenerator-runtime/runtime.js:303:0)
at Generator.prototype.(anonymous function) [as next] (~/regenerator-runtime/runtime.js:117:0)
at step (~/babel-runtime/helpers/asyncToGenerator.js:17:0)
at server-bundle.js:1105:13
测试仓库:https://github.com/piyushchauhan2011/nuxt-component。有什么办法可以解决这个问题,以便我们可以在 Nuxt 项目中将 es6 类语法与 vuejs 一起使用?
【问题讨论】:
标签: javascript ecmascript-6 vue.js nuxt.js