【问题标题】:StackBlitz Ionic 5 Vue 3 sample: Import error, can't find file index.cjs.jsStackBlitz Ionic 5 Vue 3 示例:导入错误,找不到文件 index.cjs.js
【发布时间】:2021-01-05 08:03:27
【问题描述】:

我想创建一个 Ionic 5 Vue 3 示例:

https://stackblitz.com/edit/vue-ionic-attempt-qj2xsx?

但它总是告诉我:

Import error, can't find file:
./cjs/index.cjs.js

知道如何解决这个问题吗?

【问题讨论】:

    标签: vue.js ionic-framework stackblitz


    【解决方案1】:

    似乎某些 ionic vue 版本存在问题,仅包括 index.js,而不是像 cjsesm 这样的变体。

    https://github.com/ionic-team/ionic-framework/issues/22765

    我 fork 你的 stackblitz 并将 ionic vue 更新到 5.6

    # package.json
    -    "@ionic/vue": "^5.5.2",
    -    "@ionic/vue-router": "^5.5.2",
    +    "@ionic/vue": "^5.6.0",
    +    "@ionic/vue-router": "^5.6.0",
    

    https://stackblitz.com/edit/vue-ionic-attempt-pwwqq3?file=package.json

    仍然没有启动,刚刚从 vue 路由器收到一个新错误。

    Error in /turbo_modules/vue-router@4.0.6/dist/vue-router.global.js (3343:7)
    Vue is not defined
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-10
      • 2014-10-30
      • 2021-07-08
      • 1970-01-01
      • 1970-01-01
      • 2018-11-17
      相关资源
      最近更新 更多