Skip to content
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

quasar-ui-qmediaplayer not building #230

Closed
danbars opened this issue May 2, 2022 · 1 comment
Closed

quasar-ui-qmediaplayer not building #230

danbars opened this issue May 2, 2022 · 1 comment
Labels
invalid This doesn't seem right

Comments

@danbars
Copy link

danbars commented May 2, 2022

Not sure if this is an issue with quasar-ui-qmediaplayer or with this project.
I have a quasar site with quasar-ui-qmediaplayer package, and when I try to build:ssg I get the following error:

[  Error: /Users/xxx/xxx/xxx-site/node_modules/@quasar/quasar-ui-qmediaplayer/dist/index.cjs.js
  require() of ES modules is not supported.
  require() of /Users/xxx/xxx/xxx-site/node_modules/@quasar/quasar-ui-qmediaplayer/dist/index.cjs.js from /Users/xxx/xxx/xxx-site/node_modules/.cache/quasar-app-extension-ssg 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/xxx/xxx/xxx-site/node_modules/@quasar/quasar-ui-qmediaplayer/package.json.

If I rename index.cjs.js inside node_modules to index.cjs and update its package.json file with "main": "index.cjs" the build passes. This might indicate that this is an issue with the other package.
However, I believe that their build is standard and these files are named like this by default.
Is this something that this project can fix, or is there something wrong with quasar-ui-qmediaplayer's build?

@freddy38510
Copy link
Owner

freddy38510 commented May 2, 2022

Hello,

I found the same issue which happens with ssr mode too.

I believe that the filenames are fine. By referring to the Quasar components build standard, it looks like the "type": "module" line should be removed in the package.json file in order to use their component at server-side.

@freddy38510 freddy38510 added the invalid This doesn't seem right label May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants