The latest version of Storybook couldn't be fetched (in static build)
See original GitHub issueDescribe the bug
In the static build of Storybook, the latest version of Storybook cannot be fetched. It doesn’t matter if I open the index.html
locally or open the deployed version on my server.
To Reproduce Steps to reproduce the behavior:
- Build Storybook
- Open
storybook-static/index.html
in your browser - Got to the “About your Storybook” page
- Error:
Oops! The latest version of Storybook couldn't be fetched.
Screenshots
Expected behavior Fetch the current version of Storybook and display the information like in the served version:
System:
npx -p @storybook/cli@next sb info
(or without @next
) is throwing an error:
Environment Info:
(node:45923) UnhandledPromiseRejectionWarning: TypeError: (e || []).filter is not a function
at /Users/<my name>/.npm/_npx/45915/lib/node_modules/@storybook/cli/node_modules/envinfo/dist/envinfo.js:1:73314
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Promise.all (index 6)
(node:45923) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:45923) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Gatsby - The result of this StaticQuery could not be fetched
A fix has just been made on the gatsby project (github.com/gatsbyjs/gatsby/pull/26077/). It is now available on version 2.24.13.
Read more >[Gatsby] Solutions to "The result of this StaticQuery could not ...
Error: The result of this StaticQuery could not be fetched. This is likely a bug in Gatsby and if refreshing the page does...
Read more >CLI options - Storybook
Storybook comes with two CLI utilities: start-storybook and build-storybook . Storybook collects completely anonymous data to help us improve user experience.
Read more >storybook failed to fetch dynamically imported module - You.com
Had multiple issues upgrading through yarn upgrade so the final solution was to remove all old packages and run npx -p @storybook/cli@ sb...
Read more >Storybook & Gatsby - Staticquery could not be fetched
Gatsby provides static files that are created during the initial compilation of the build process, which is when the GraphQL queries are run....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah… the deployed (build) version of sb always throws this error. currently on 6.3.12
I decided to take a look at this one, and I have some information to push it ahead. I do not have a solve, yet.
about.tsx
looks like this:And so it is no wonder that this always happens. Our
canUpdate
in this file will always evaluate to null, which means we will always take theOops! ...
route.updateCheck
inupdate-check.ts
:To be honest, I’m a junior developer and don’t understand everything about what I’m looking at here. However, I do not think that the problem is that we’re hitting the timeout promise. I believe someone alludes to that upward in this thread, and I just can’t see it.
https://storybook.js.org/versions.json
responds well within 1500 milliseconds–around 200 for me. It should nearly always win the promise race unless the server is down. Here are some questions I have:time
such that the fetch just simply never, ever happens? If I understand how to log out of this function, I can check this one.It’s completely possible that updateCheck is fine, but I thought starting here would be the right choice just in terms of troubleshooting.
UPDATE: Additional question:
updateCheck
run in the non-dev standalone build at all?