-
-
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
In v6.1.6 storybook react no longer loads. It generates a bad bundle name #13261
Comments
Do you have a repro repo you can share? Unable to reproduce. Or if not a full repro, what does this part of your
|
It looks exactly like that. Sorry not a public repo. I was able to remove the |
Can someone with this error please share the following:
I have upgraded our shapes demo repository to To make sure this issue is unrelated to manager caching, please delete |
@ghengeveld to me this looks like a bug with the static route change?! |
You mean the |
Your PR in that release changed the code related to the static directory handling, and now a static file is serving incorrectly. |
That seems likely, but so far I can't reproduce. |
Just tried again with v6.1.7.
running It builds okay
but in the browser I just get a blank page. In the console I see:
The bundle hash is not the same as any of the hashes that the page attempts to load.
const path = require('path')
module.exports = {
stories: [
"../src/**/*.stories.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)"
],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/preset-create-react-app"
],
webpackFinal: async (config) => {
config.resolve.modules = [
...(config.resolve.modules || []),
path.resolve(__dirname, "../src")
]
return config
}
}
import redux from './redux.decorator'
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" }
}
export const decorators = [redux]
> start-storybook -p 6006 -s public
info @storybook/react v6.1.7
info
info => Loading static files from /Users/davesag/src/[redacted]/public and serving at /.
info => Using prebuilt manager
info => Loading presets
info => Loading 1 config file in "./.storybook"
info => Loading 7 other files in "./.storybook"
info => Adding stories defined in ".storybook/main.js"
info => Loading Webpack configuration from `node_modules/react-scripts`
info => Removing existing JavaScript and TypeScript rules.
info => Modifying Create React App rules.
info => Using default Webpack setup
webpack built 6c4d9ade43c0dc5108cd in 12596ms
╭────────────────────────────────────────────────────╮
│ │
│ Storybook 6.1.7 started │
│ 14 s for preview │
│ │
│ Local: http://localhost:6006/ │
│ On your network: http://192.168.20.23:6006/ │
│ │
╰────────────────────────────────────────────────────╯ |
Can you try running with |
Anybody can help me with this issue? |
How to downgrade? Only manually? |
I'll try this later today and report back. Also I see SB is now up to 6.1.9 so will try that too. |
Okay I just tried upgrading my project to 6.1.9. Starting up storybook gave the same issue as before - a malformed bundle name (or at least a different bundle hash to the one the system is looking for). Starting it up again however with Once it works then dropping the |
I am getting a slightly different error but seems to be related to upgrading. I recently used the auto-upgrade with I can confirm that the same issue is on version |
@kiily Looks like you've misconfigured addon-backgrounds. It takes an array of This is unrelated to the issue at hand, so if you can't work it out, please open a separate bug report. |
Hi @ghengeveld, reverting actually gave me a helpful warning and pointed me in that direction too. I think it's just configured with the old API and hence the error. I will test and report back, will open a new issue if necessary but feels like that should do the trick. Thanks for the quick reply, keep smashing it guys. Amazing job all around 🎉 |
@ghengeveld I can confirm that fixes the issue 🙏 Thanks again |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Just hit this on an upgrade to 6.1.18 and this did the trick for me as well. |
I just want to add that @davesag tip worked for me. After I had did the npx upgrade as suggeted, my storybook dev server was looking for a main.xxx.js bundle that wasn't there. (404) - Once u ran storybook with the suggested tag I was able to get my SB back. |
Egads!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.3.0-alpha.44 containing PR #14993 that references this issue. Upgrade today to the
Closing this issue. Please re-open if you think there's still more to do. |
I still experienced this problem after updating from 6.3.2 to 6.3.7. Adding the option |
EDIT: Clearing my browser cache solved the issue. Not sure why, but it seems like storybook doesn't look at the new main.[hash].bunder.js file when the hash changes. I'm encountering this issue in a way that doesn't seem to be related to upgrading storybook. After running
Storybook stuff from package.json (this has not changed):
main.js: preview.js: Another piece of the puzzle is that, if I run |
I had this issue when moving a repo from GH to GL, upgrading to |
I tried all of the suggestion above, didn't work. |
Running now on 6.3.12 on a fresh install (NextJS, TS, Tailwind, Storybook), but doesn't work. Also non of the workarounds mentioned in this thread unfortunately. No errors in the terminal
some in the console;
|
Same issues for me sadly :/ |
Same for |
@fllprbt Did you trash |
Running into the same issue for new builds of my Storybook using v6.5.5 for this project which is hosted over here.
Every time I push an update, following scripts are running on my server:
where the storybook:build script is:
What I tried:
Would be super happy seeing this getting solved. At least, if there is nothing we can do from Storybook's side, is there anything that I can clean (e.g. node_modules/.cache) on rebuild to make this go away? |
Describe the bug
In v6.1.6 storybook react builds but no longer loads in the browser. It generates a bad bundle name
Reverting back to 6.1.4 fixes the problem
To Reproduce
Upgrade a React project that is working under Storybook 6.1.4 and run storybook and you get a blank browser page.
In the console it says
Expected behaviour
I expected the storybook to load
System
Environment Info:
System:
OS: macOS 10.15.7
CPU: (16) x64 Intel(R) Xeon(R) W-2140B CPU @ 3.20GHz
Binaries:
Node: 14.15.1 - ~/.nvm/versions/node/v14.15.1/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.8 - ~/.nvm/versions/node/v14.15.1/bin/npm
Browsers:
Chrome: 87.0.4280.67
Safari: 14.0.1
npmPackages:
@storybook/addon-actions: ^6.1.6 => 6.1.6
@storybook/addon-essentials: ^6.1.6 => 6.1.6
@storybook/addon-links: ^6.1.6 => 6.1.6
@storybook/node-logger: ^6.1.6 => 6.1.6
@storybook/preset-create-react-app: ^3.1.5 => 3.1.5
@storybook/react: ^6.1.6 => 6.1.6
The text was updated successfully, but these errors were encountered: