使用nuxt-class-component时出错

时间:2017-05-29 07:45:17

标签: javascript ecmascript-6 vue.js nuxt.js

我复制粘贴了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?

1 个答案:

答案 0 :(得分:0)

最新版本的Nuxt.js 1.0.0-alpha2修复了错误。