Closed maxp121 closed 3 months ago
You can hint the storybook cli to the right directory with the flag --config-dir
.
For example:
npx storybook@latest upgrade --config-dir ./apps/storybook/.storybook
Hi there @maxp121 ! Thanks for filing an issue. here's the docs page:
https://nx.dev/recipes/storybook/upgrading-storybook
If you look at your logs, it says You can pass a --config-dir flag to tell Storybook, where your main.js file is located at)
.
Please let me know if you have any more questions! I will be closing this for now, since it's not a bug!
When passing the --config-dir
flag like this npx storybook@latest upgrade --config-dir ./libs/ui/.storybook
I get the following error:
╭────────────────────────────────────────────────────────────────╮
│ │
│ Upgrading Storybook from version 7.6.17 to version 8.0.5.. │
│ │
╰────────────────────────────────────────────────────────────────╯
SB_CLI_UPGRADE_0005 (UpgradeStorybookUnknownCurrentVersionError): We couldn't determine the current version of Storybook in your project.
Are you running the Storybook CLI in a project without Storybook?
It might help if you specify your Storybook config directory with the --config-dir flag.
at doUpgrade (/Users/myusername/.npm/_npx/bc7e1e37fcb46ffc/node_modules/@storybook/cli/dist/generate.js:612:358)
at async withTelemetry (/Users/myusername/.npm/_npx/bc7e1e37fcb46ffc/node_modules/@storybook/core-server/dist/index.js:28:3579)
at async upgrade (/Users/myusername/.npm/_npx/bc7e1e37fcb46ffc/node_modules/@storybook/cli/dist/generate.js:612:2097)
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
@mathieudehaeck this seems to be a problem with the storybook
upgrade
command. Can you please open an issue to the Storybook repo? Can you also make sure that libs/ui/.storybook
exists, or if it needs a different syntax?
Current Behavior
i'm trying to upgrade to storybook 8 in a monorepo and getting an error that says main.js missing.
Expected Behavior
storybook to be upgraded to version 8 and project migrated
GitHub Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
No response