【问题标题】:Getting error while using nuxt-class-component使用 nuxt-class-component 时出错
【发布时间】: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


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2019-10-20
      • 1970-01-01
      • 2019-12-06
      • 1970-01-01
      • 2021-10-27
      • 2023-02-09
      • 2015-05-29
      • 2021-06-15
      • 2021-06-04
      相关资源
      最近更新 更多