joshbolduc / vscode-story-explorer

Browse and preview Storybook stories inside VS Code
MIT License
29 stars 1 forks source link

Configuration in a workspace #1035

Open vlrmprjct opened 1 year ago

vlrmprjct commented 1 year ago

Hello,

I'm try to run story-explorer inside vscode.

But I get this error msg:

Error: No configuration files have been found in your configDir (/d/Projects/react-2023/app/.storybook).
Storybook needs "main.js" file, please add it (or pass a custom config dir flag to Storybook to tell where your main.js file is located at).
    at validateConfigurationFiles (/d/Projects/react-2023/library/node_modules/@storybook/core-common/dist/index.js:9:30)

The first trouble I have is about the main file . I use main.ts .

The second one is I use a different config path: /d/Projects/react-2023/library/config/storybook but the error message above is using another project path while I am running 2 projects in a workspace.

How can I solve this ?

joshbolduc commented 1 year ago

I may need a bit more information to narrow this down. What steps are you following to get that error? Are your stories appearing in the stories view? There's a gear icon in the stories view that opens your configuration file--is that enabled, and if so, what happens when you click it?

If your config directory isn't called .storybook, you'll need to specify the path manually, e.g., by setting storyExplorer.storybookConfigDir to something like library/config/storybook. (If you haven't already done this, I don't actually think the extension would offer to launch Storybook at all--so either there may be some bug there, or I may be misunderstanding the steps you've taken so far.)