quasar-ui-qmediaplayer icon indicating copy to clipboard operation
quasar-ui-qmediaplayer copied to clipboard

problem with quasar dev -m ssr

Open GoldMyr1994 opened this issue 3 years ago • 4 comments

Describe the bug When i run quasar dev -m ssr i get the following error on the browser

Must use import to load ES Module: /Users/mauroconte/Desktop/org-noflags/noflags-quasar/node_modules/@quasar/quasar-ui-qmediaplayer/dist/index.cjs.js require() of ES modules is not supported. require() of /Users/mauroconte/Desktop/org-noflags/noflags-quasar/node_modules/@quasar/quasar-ui-qmediaplayer/dist/index.cjs.js from /Users/mauroconte/Desktop/org-noflags/noflags-quasar is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules. Instead rename index.cjs.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/mauroconte/Desktop/org-noflags/noflags-quasar/node_modules/@quasar/quasar-ui-qmediaplayer/package.json.

To Reproduce Steps to reproduce the behavior:

  1. yarn create quasar (I created a basic project named quasar-project)
  2. install quasar-ui-qmediaplayer using boot file following instaction here https://qmediaplayer.netlify.app/all-about-qmediaplayer/installation-types#Uninstall
  3. quasar dev -m ssr
  4. i get the error reported above in the browser and in the console

Expected behavior it should work without errors

Desktop (please complete the following information):

  • OS: MacBookProM1
  • Browser Chrome
  • Version Versione 99.0.4844.83 (Build ufficiale) (arm64)

Additional context I red the error and it is about 'type="module"'. In my package json i don't have that. I tried to remove from the package json of quasar-ui-qmediaplayer inside node_modules folder and it seems to work but i can't do like.

GoldMyr1994 avatar Mar 28 '22 13:03 GoldMyr1994

Are you using app-vite?

hawkeye64 avatar Mar 31 '22 15:03 hawkeye64

No, i don't kwnow what is app-vite but i'm not using it. As explained i'm trying with a empty quasar project, nothing added except quasar-ui-qmediaplayer

GoldMyr1994 avatar Apr 01 '22 09:04 GoldMyr1994

I'll be looking into this further as time permits.

hawkeye64 avatar Apr 08 '22 13:04 hawkeye64

Seems this extension is abandonned ? Does somebody have a workaround to make it work with SSR ?

tomtomcrypto avatar May 08 '24 07:05 tomtomcrypto