-
-
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
"Singleton client API not yet initialized" #10887
Comments
have you tried clearing node_modules, and possibly regenerating your lock file? |
@gforrest-bw check inside your lock file too |
I did clear node_modules. I didn't try deleting the lockfile though, good call. FWIW |
Deleting the lockfile has at least gotten me to a different error (a React invalid hook call). I'll spend some time investigating it and open a new issue if I can't get past it. Edit: yeah, new issue is #10895, so looks like I'm unblocked from this error. Thanks! |
I can reproduce this in https://github.com/grafana/grafana/tree/storybook-build-optimization Have tried cleaning lockfile and node_modules - had some version issues |
@tskarhed can you remove these lines? They should be implemented in |
@shilman I just got this error while trying to symlink a storybook package of my project to the development dist folder. |
We found the issue. Using |
@shilman, I'm not sure, this code has been refactored a bit since I worked on it. This is the important entry that we add to initialize the client API: https://github.com/storybookjs/storybook/blob/next/lib/core/src/server/preview/entries.js#L40 I wonder if this sorting is incorrect and doesn't ensure it stays at the top. @ndelangen? |
I'll take a look |
@tskarhed I ran locally, and navigated to a few stories, I'm not seeing the error described in this report. Could you tel me what to do? The branch is not on the latest version. Could I ask you to try the latest beta and see if the issue is resolved? |
@ndelangen Yeah, we pushed the fix. If you change |
We are facing the exact same issue in https://github.com/SAP/ui5-webcomponents-react/tree/storybook-issue-repro. Environment Info
|
@MarcusNotheis I'm taking a look at your repro now. |
Thanks @ndelangen. EDIT: |
@MarcusNotheis I can confirm that Actions work on |
If the decorator can't be added that would explain why the actions aren't working I expect? |
w00t!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-beta.24 containing PR #11092 that references this issue. Upgrade today to try it out! You can find this prerelease on the Closing this issue. Please re-open if you think there's still more to do. |
just upgraded to beta.26 and our Storybook is now working perfectly fine again! Thanks @ndelangen and @shilman! |
I still have the same issue 😢 "@storybook/addon-actions": "^6.3.6",
"@storybook/addon-controls": "^6.3.6",
"@storybook/addon-docs": "^6.3.6",
"@storybook/addon-knobs": "^6.2.9",
"@storybook/addon-links": "^6.3.6",
"@storybook/addon-measure": "^2.0.0",
"@storybook/addon-options": "^5.3.21",
"@storybook/addon-toolbars": "^6.3.6",
"@storybook/addon-viewport": "^6.3.6",
"@storybook/addons": "^6.3.6",
"@storybook/builder-webpack5": "^6.3.6",
"@storybook/react": "^6.3.6",
"@storybook/storybook-deployer": "^2.8.10",
"@storybook/theming": "^6.3.6",
"@storybook/builder-webpack5": "^6.3.6",
"@storybook/manager-webpack5": "^6.3.6", And I'm using Here is the error message: bootstrap:27 Uncaught Error: Singleton client API not yet initialized, cannot call addParameters
at addParameters (vendors-node_modules_crello_react-lottie_dist_index_esm_js-node_modules_pmmmwh_react-refresh--bb2a89.iframe.bundle.js:62509)
at vendors-node_modules_crello_react-lottie_dist_index_esm_js-node_modules_pmmmwh_react-refresh--bb2a89.iframe.bundle.js:26807
at Array.forEach (<anonymous>)
at ./node_modules/@storybook/addon-docs/dist/esm/frameworks/common/config.js-generated-other-entry.js (vendors-node_modules_crello_react-lottie_dist_index_esm_js-node_modules_pmmmwh_react-refresh--bb2a89.iframe.bundle.js:26781)
at Object.options.factory (runtime~main.iframe.bundle.js:662)
at __webpack_require__ (runtime~main.iframe.bundle.js:28)
at __webpack_exec__ (main.iframe.bundle.js:259182)
at main.iframe.bundle.js:259183
at Function.__webpack_require__.O (runtime~main.iframe.bundle.js:80)
at main.iframe.bundle.js:259184 |
The issue is gone after running: npm ls | grep client-api
npm dedupe |
I was also getting this after upgrading to Just ended up rolling back to 6.2.9 :( |
@gavmck There's a |
@shilman Yeah I tried that, but no luck unfortunately. I'll come back to it later. Thanks! |
The solution for vite builder — force dedupe (see https://github.com/eirslett/storybook-builder-vite#customize-vite-config): async viteFinal(config, {configType}) {
config.resolve.dedupe = ["@storybook/client-api"]
return config
}, |
I'm getting this when upgrading to 6.3.8, more info in #16097 |
Hi @penx - did you manage to solve this? I just ran into this problem :D |
I had this problem because I had two versions of @storybook/client-api. |
Describe the bug
Page crashes after a successful build, with the message in console:
I encountered this error while upgrading our 5.x repo to the latest 6 beta, in hopes of discovering if the new default behaviors would help fix our prop tables for Typescript components.
To Reproduce
I'm afraid I'm in a private repo.
I've attempted to reproduce the error with the exact same package versions and configuration in a clean project, to no avail. If a lack of repro is a problem, I understand - I mainly wanted to see if someone familiar with the codebase might be able to give me a hint as to why I'd ever see the error posted above, or how to debug.
Expected behavior
I expected Storybook to load in the browser after building.
Screenshots
Code snippets
main.js
I've removed all other configuration for Storybook to try to isolate the problem and test default 'no config' behaviors.
System:
Additional context
The text was updated successfully, but these errors were encountered: