-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Failed to fetch dynamically imported module #12806
Comments
Hi @diadal! 👋 It looks like you provided an invalid or unsupported reproduction URL. Without a proper reproduction, your issue will have to get closed. Thank you for your collaboration. 👏 |
Hi, Please try again with q/app beta.4 |
Please post a bare-minimum reproduction repo. |
Thanks for supplying the repo. Your problem is more related to Vite itself or the way that you are supposed to use the ionic stuff, but can't tell without extensive research. This is a very unusual way to use Capacitor stuff without Capacitor mode itself (not that you need it; I get what you're trying to achieve). Unfortunately, can't afford to invest this large amount of time on an unproven Quasar CLI issue -- I'm fairly confident (99%) that this is not Quasar at fault here. |
but this work fine with webpack i guess like you said the issue may be with vite also, it will be nice if quasar will have its own module for file input and camera option but have used a different approach |
Hi, It's been a while since this issue was raised (and closed) but I have experienced the same issue. It seems that the file, "pwa-camera-modal.entry.js" is not in the location it is expected. http://localhost:9000/node_modules/.q-cache/vite/spa/deps/pwa-camera-modal.entry.js. The camera example on this page, https://quasar.dev/quasar-cli-vite/developing-capacitor-apps/capacitor-api does not work. I understand it is not a priority but it would be great if you could take a look at the issue. |
El problema se soluciona utilizando webpack, a mi igual me salto el error y al parecer es de vite el error para no seguir con el problema me tuve que pasar a webpack |
I translated your comment. Yes, it works with Quasar with Webpack but not Quasar with Vite. I tried again today with a new app with the same (bad) result. This page mentions the issue and a possible workaround: ionic-team/pwa-elements#109. I added the cdn links on this page https://capacitorjs.com/docs/web/pwa-elements to the index.html file in the Quasar project folder and it seems to work (but it took quite a long time to initilalise the first time). I think it will be possible to load the ionicpwaelements.js file locally but I havent tried it. It would be good to not have to go to this trouble. Here are the links. <script type="module" src="https://unpkg.com/@ionic/pwa-elements@latest/dist/ionicpwaelements/ionicpwaelements.esm.js"></script> <script nomodule src="https://unpkg.com/@ionic/pwa-elements@latest/dist/ionicpwaelements/ionicpwaelements.js"></script> |
That yes, with CDN it works well and I was testing details in that way, is that when I need to do it offline the CND does not give the first time but as a temporary solution it is not bad at all. |
Thanks for the suggestion! |
Yes, It is possible to load the files from node_modules folder:
|
The very same error is occurring when using "ckeditor" in a Vue / Vite project. Very annyoing. 70% of the page request this error pops up, 30% of the time the editor loads and the content is being displayed. |
This is a possible solution, but it doesn't work if you are using Capacitor and want to build a web application and an android app. I was doing some tests, and using this kind of ''import'' only works when we run
I found this script in the pwa-elements documentation: |
What happened?
Unable to cache
pwa-camera-modal.entry.js
TypeError: Failed to fetch dynamically imported module:
yarn add @ionic/pwa-elements
boot/capacitor.ts
https://127.0.0.1:8008/node_modules/.q-cache/vite/spa/pwa-camera-modal.entry.js
What did you expect to happen?
able to use capacitor camera on the web
Reproduction URL
no link
How to reproduce?
install
1:
yarn add @ionic/pwa-elements
2: Add capacitor.ts to quasar.config.js boot
3: quasar d
4: test the capacitor camera on web you it wont work
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
SPA Mode
Platforms/Browsers
Chrome
Quasar info output
No response
Relevant log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: