-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
[Bug]: 7.0.8+ "Uncaught SyntaxError: Unexpected token 'export'" if "type" is "commonjs" in package.json #22511
Comments
Experiencing this as well, works up until 7.0.7 |
I just ran into this while migrating from v6 to v7 in my project. I can confirm that changing the type field in package.json from commonjs to module stops the error and storybook is able to load. (though I'm facing other problems I'm hoping are just issues with our existing setup) (Sorry for the dupe comment SB team, I just realized I left this on the original PR and not this open issue) |
synapse-react-client - Fix storybook (see storybookjs/storybook#22511)
Confirm it in 7.0.20, and changing to Removing |
In case anyone else is tempted by the recent releases, I can confirm this is still an issue in 7.1.1 and 7.2.0. I have one project I was able to remove the type but another where it causes other issues so that one is pinned to 7.0.7 |
Still not working with version |
Still is an issue in 7.5.1 |
Describe the bug
Build runs fine but on page load we get a white screen with "Uncaught SyntaxError: Unexpected token 'export'" from each of the addons.
Talking with @JReinhold and we think it is likely #22247 that is the culprit.
The error only occurs if the type is explicitly "commonjs".
If it is missing or set to "module" then it does not occur.
To Reproduce
https://stackblitz.com/edit/github-3zs2je?file=package.json
System
Additional context
Original Discord thread
The text was updated successfully, but these errors were encountered: