Closed lindseybradford closed 1 year ago
HI there @lindseybradford ! Interesting issue! Can you please share a minumum reproduction repository that I can take a quick look at?
Or at least can you share your package.json
for starters?
The check we're doing for logging that error during storybook:configuration
is the following:
if (storybookMajorVersion() === 6) {
throw new Error(pleaseUpgrade());
}
ref: packages/storybook/src/generators/configuration/configuration.ts#L50
and the storybookMajorVersion
function looks like this:
export function storybookMajorVersion(): number | undefined {
try {
const storybookPackageVersion = require(join(
'@storybook/core-server',
'package.json'
)).version;
return major(storybookPackageVersion);
} catch {
return undefined;
}
}
ref: packages/storybook/src/utils/utilities.ts#L38
So maybe you have storybook/core-server
installed?
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
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.
Current Behavior
Existing monorepo. Added Lerna and ran the
npx lerna add-caching
command to add NX task caching.Tried to install storybook but get conflicting errors that I should migrate to 7 but because there are no existing instances, the migration fails with "no packages found".
Expected Behavior
Run storybook setup configuration successfully
GitHub Repo
No response
Steps to Reproduce
node_modules
andpackage-lock.json
npm install -D @nx/storybook
(success)nx g @nx/storybook:configuration {project-name} --tsConfiguration=true --uiFramework=@storybook/react-vite
(error:Storybook 6 is no longer maintained. Please upgrade to Storybook 7
)npx nx g @nx/storybook:migrate-7
(error:No Storybook packages installed. 🚨 Nx did not find any Storybook packages installed in your workspace. So no migration is necessary.
Nx Report
Failure Logs
No response
Operating System
Additional Information
No response