-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[🐞] error during build: RollupError: Duplicate export 's_DyVc0YBIqQU' #4768
Comments
P.S. The error seems to be thrown from qwikloader.ts: https://github.com/BuilderIO/qwik/blob/190f0bcd7593745b58aef07054547551253d087b/packages/qwik/src/qwikloader.ts#L85 |
Same error here. |
@og-dev Are you having this error for the same reason? |
In this PR we have the same issue during the production build 😔😢 |
@gioboa @the-r3aper7 That might be related to #5473 You could try linking qwik-ui in the PR branch and removing preserveModules, then build, to see if it works. I'm in the process of cleaning-up qwik-ui's codebase, and I'll submit another PR to remove |
@gioboa I believe new starter projects include a piece of code preventing from running into this issue. But still would prefer having a proper error message for it so I keep this open. |
Which component is affected?
Qwik Rollup / Vite plugin
Describe the bug
I accidentally added a dependency (@builder.io/qwik-react) both in
devDependencies
anddependencies
to my package.json file, and got this obscure error message with no qwik way to know what's happening when building it for production.This seems to happen not just for this package but for some others as well. For example, I tried with @builder.io/qwik-city and got the same error. But with @builder.io/qwik it doesn't throw anything.
I don't know if this can be fixed and I guess it's actually good to have an error message when there is a duplicate entry like that, but the current error message says "duplicate export", which led me to think that I had written two
export
statements somewhere in my code.Reproduction
npm create qwik@latest
Steps to reproduce
npm create qwik@latest
dependencies
in package.json (I don't know how I ended up doing this, but I did. It was accidental.). This is the critical step to reproduce this issue. You need to have "@builder.io/qwik-city": "^1.2.6" in devDependencies and in dependencies.cd
into projectnpm install
npm run preview
The bug can be reproduced with npm and pnpm as well. I haven't tried it out with yarn.
System Info
System: OS: Linux 6.3 Fedora Linux 38 (Workstation Edition) CPU: (16) x64 13th Gen Intel(R) Core(TM) i5-1340P Memory: 21.87 GB / 31.05 GB Container: Yes Shell: 3.6.1 - /usr/bin/fish Binaries: Node: 18.16.1 - /usr/local/bin/node npm: 9.7.2 - /usr/local/bin/npm pnpm: 8.6.7 - ~/.local/share/pnpm/pnpm Browsers: Chrome: 114.0.5735.198
Potential solutions
I think an added error message suggesting something like "You may run into this error because you have a duplicate entry in
dependencies
anddevDependencies
in package.json." may be helpful.The text was updated successfully, but these errors were encountered: