question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught Error: Singleton client API not yet initialized, cannot call addParameters

See original GitHub issue

I have managed to get storybook running with start-storybook. I have also now managed to get the build compete. But when I open the generated SB page I get the following error:

iframe.778fe525.js:33 Uncaught Error: Singleton client API not yet initialized, cannot call addParameters
    at addParameters (iframe.778fe525.js:33)
    at iframe.778fe525.js:90
    at Array.forEach (<anonymous>)
    at iframe.778fe525.js:90
    at Array.forEach (<anonymous>)
    at iframe.778fe525.js:90

Has anyone seen something similar perhaps?

I am using vue3 on windows.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:22 (6 by maintainers)

github_iconTop GitHub Comments

7reactions
husaytcommented, Sep 13, 2021

I finally found a solution to this here I will just copy the correct answer, as it solved this for once:

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
},

Thanks @develar

1reaction
spacedawwwgcommented, Jan 26, 2022

@IanVS that was a mixup when I was creating the repo. I’ve updated them all to next (on the repo above) and it’s the same issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Singleton client API not yet initialized" · Issue #10887 - GitHub
Uncaught Error : Singleton client API not yet initialized, cannot call addParameters after upgraded from 6.3.0-beta.16 to 17 #15210.
Read more >
Error: Singleton client API not yet initialized... #13793 - Issuehunt
client_api.js:93 Uncaught Error: Singleton client API not yet initialized, cannot call addParameters at addParameters (client_api.js:93) at Object.
Read more >
@storybook/client-api - npm
In order to appear to the store like the CSF API, a call to storiesOf().add() does the following: Tracks the story added in...
Read more >
lib/client-api/src/ClientApi.ts - Storybook - Fossies
44 addParameters: `Instead, use \`export const parameters = {};\` in your ... 75 throw new Error(`Singleton client API not yet initialized, cannot call...
Read more >
Storybook throwing errors - Stack Overflow
The error log is pointing out that your min-indent package may be missing from your node_modules folder for whatever reason. Error: Cannot ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found