-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
GET http://localhost:6006/sb-preview/runtime.js net::ERR_ABORTED 404 (Not Found) #30335
Comments
** Disclaimer** This information might be inaccurate, due to it being generated automatically To fix this:
|
Experiencing the same 404 error. However, I am using the @storybook/react-vite framework. |
Same 404 error as well. I’ve filed a separate bug report for it since I’m not having the other non 404 issue in this bug. |
Same error on @storybook/react-vite |
@lovelyJason is on windows. @shavonn @coryphil @mdillgen are you all on windows too? i am unable to reproduce. |
Hi @shilman , I am on MacOS. |
@mdillgen Thanks so much. When I install this on my computer it runs fine:
Can you please run |
Hi, @shilman . Thank YOU for investigating. First off all you are right, it runs with ![]() Also during build it throws some warnings:
Storybook Environment Info: System: I have updated the example repo to contain the right start script! |
Great. I'll give it a shot when I get back to my computer! |
@shilman I am on MacOS. Using react-vite. |
@shilman I am experiencing it in both production and dev. Just the console errors for 404 on runtime and iframe and infinite spinner until I refresh the page.
|
@coryphil do you have a repro you can share? |
Same error here. The issue occured when I upgraded storybook from 8.5.0 to 8.5.1 I also updated to 8.5.2, but nothing changed.
|
see #30378 related? |
@MatheoJaouen Yes, they are related. I created that bug since my issue was only the 404 and not the additional things in this one. Sorry if there was any confusion. |
@shilman Unfortunately, I can not share my repo. As for reproduction steps I just install any storybook version post 8.3.7 and try to run pnpm storybook (I am using react-vite). There are no errors in terminal. Console has the previously stated 404s. |
OK I'm reproducing now based on @mdillgen 's repo. Thanks everybody for your patience! Will try to track it down with the team. 🎉 |
Documenting the issue for the team, summarizing the above:
vite v6.0.11 building for production...
node_modules/@storybook/core/dist/preview/runtime.js (3212:15): Use of eval in "node_modules/@storybook/core/dist/preview/runtime.js" is strongly discouraged as it poses security risks and may cause issues with minification.
node_modules/@storybook/core/dist/preview/runtime.js (3214:16): Use of eval in "node_modules/@storybook/core/dist/preview/runtime.js" is strongly discouraged as it poses security risks and may cause issues with minification.
✓ 122 modules transformed.
<link href="./sb-preview/runtime.js" rel="prefetch" as="script" /> Digging in a little more, it looks like the file Some guesses:
At any rate, we should do something about it. |
Just adding my affected versions to the discussion, errors show when everything is on the latest release 8.5.3 Command:
Results in:
Storybook Environment Info:
|
clean repo and updated packages:
error prevents us from running chromatic and it's a blocker, as configurations done in preview are not fired. do we know when fix is expected to be done for this? |
I'm experiencing the same issue with Lit + Vite.
I tried downgrading to 8.5.0 but getting the same error. 8.4.7 works. |
I am also experiencing the same issue and although Storybook runs fine, when a story has custom JS that's when the error happens and the custom JS does not execute. Here are my environment details:
|
Exact same problem here with React + Vite. Development works fine. Static build errors out. |
🚨 ATTENTION 🚨 Per my comment above, this is a real bug and we'll get to the bottom of it. However, as far as I can tell, it doesn't actually have a huge impact on anything. If you're having a problem with Storybook and believe that this error is the root cause, please let me know! |
@shilman this does seem to cause one issue. Since I have to manually refresh storybook to get it to actually load, when it goes through an automated build process, like say for chromatic, it causes a bunch of errors because it never loads as those don’t know to refresh the page once to account for the error. Also, thank you so much for the investigation of this bug. |
@coryphil what problem do you have with chromatic? I had a teammate also report this bug in connection to the |
@shilman Due to this bug our static storybook build does not load. So our entire organisation is missing documentation. I'm absolutely not trying to push or anything, because you guys are going as hard as you can. Just stating that this bug does have a severe impact for us. |
@trekinbami are you sure this bug is the problem? I'm asking because I'm seeing the bug but I'm not seeing any serious side effects of the bug. Do you have a reproduction you can share? Will absolutely fast track this if i have hard evidence it's breaking stuff. |
@trekinbami Yes, with this issue we getting Failed to fetch dynamically imported module, :6006/sb-preview/runtime.js:1 Failed to load resource: the server responded with a status of 404 (Not Found). When this occurs all mapping breaks and cannot load any .ts Windows environment as well. |
I don't know if this is caused by runtime.js. However, I also get the mentioned error whenever a React component is passed a children prop. I have created a very simple example here: |
For a quick fix in production on CFPages (if you're using it), you can try this shell script. mkdir -p storybook-static/sb-preview
touch storybook-static/sb-preview/runtime.js and modify build command storybook build && sh ./fix-storybook.sh |
@shilman My apologies for taking so long to respond. My issue with chromatic is that when our builds run the chromatic/storybook part will fail since the build step doesn't "reload the page" (the only current fix for the issues) so loses all its context and gives a bunch of errors about not being able to find things. Feel free to ignore if this comment is no longer useful, I haven't caught up on the other responses and closed issue. Thank you for your time. |
Describe the bug
select vue3 and vite
then run
pnpm storybook
The command line reported an error:
and on the page for http://localhost:6006/, error:
There are problems with almost all of your versions
Reproduction link
no
Reproduction steps
No response
System
Additional context
No response
The text was updated successfully, but these errors were encountered: