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
Uncaught SyntaxError: Unexpected token ':' vendors~main.iframe.bundle.js:128712 #17128
Comments
I ran into the same issue. I was able to resolve it by overwriting the storybook/lib/manager-webpack4/src/presets/manager-preset.ts Lines 114 to 117 in 2009029
in my custom webpack configuration. This change causes the error: #15925 Here is a (simplified) example of what one of our dependencies is doing, which causes the same error as above in our project. (Note: none of these variables are defined in our environment) if (process.env.SOME_VARIABLE && process.env.SOME_OTHER_VARIABLE) {
process.env.SOME_VARIABLE = `/foo/${process.env.SOME_OTHER_VARIABLE`;
} In if ({"NODE_ENV":"development","NODE_PATH":[],"STORYBOOK":"true","PUBLIC_URL":"."}.SOME_VARIABLE && {"NODE_ENV":"development","NODE_PATH":[],"STORYBOOK":"true","PUBLIC_URL":"."}.SOME_OTHER_VARIABLE) {
{"NODE_ENV":"development","NODE_PATH":[],"STORYBOOK":"true","PUBLIC_URL":"."}.SOME_VARIABLE = "/foo/".concat({"NODE_ENV":"development","NODE_PATH":[],"STORYBOOK":"true","PUBLIC_URL":"."}.SOME_OTHER_VARIABLE);
} The error occurs in the if body, as With version 6.3.x everything works as expected. |
This has equally broken using storybook with dotenv, which tries to do key assignment on |
Having essentially the same issue: Module not found: Error: Can't resolve 'fs' in '/home/bob/repos/app/node_modules/dotenv/lib'
@ ./node_modules/dotenv/lib/main.js 24:11-24
@ ./node_modules/dotenv/config.js
@ ./src/utils/env.ts
@ ./src/utils/endpoints.ts
@ ./.storybook/preview.js
@ ./.storybook/preview.js-generated-config-entry.js |
Son of a gun!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.5.0-alpha.12 containing PR #17174 that references this issue. Upgrade today to the
Closing this issue. Please re-open if you think there's still more to do. |
Yippee!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.4.10 containing PR #17174 that references this issue. Upgrade today to the
|
Originally posted by @Apoerin in #16833 (comment)
@shilman
Uncaught SyntaxError: Unexpected token ':' vendors~main.iframe.bundle.js:128712
and
vendors~main.iframe.bundle.js
points to this linefull erros
It just doesn't render my stories, all I see - loading circle
The text was updated successfully, but these errors were encountered: