2

I want to create a Ionic 5 Vue 3 sample:

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

But its always telling me:

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

Any idea how to solve this?

gurehbgui
  • 14,236
  • 32
  • 106
  • 178

1 Answers1

0

Looks like there was an issue with some ionic vue releases only including index.js, and not variants like cjs and esm.

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

I forked your stackblitz and updated ionic vue to 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

Still not starting though, just got a new error from vue router.

Error in /turbo_modules/vue-router@4.0.6/dist/vue-router.global.js (3343:7)
Vue is not defined
ConorSheehan1
  • 1,640
  • 1
  • 18
  • 30