Skip to content
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

[Bug]: Upgrade command results in Cannot find module in C:\....node_modules\@storybook\clib #25770

Closed
AS-EBaiden opened this issue Jan 26, 2024 · 5 comments

Comments

@AS-EBaiden
Copy link

Describe the bug

I am working in a monorepo, and I have gone to where storybook is housed and ran the npx storybook@latest upgrade or pnpm dlx storybook@latest upgrade or npx storybook@7.6.10 automigrate
@JReinhold

image

To Reproduce

the directory where storybook is housed and ran the various migrations
this is what happens when i run npx storybook@latest info
image

System

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`. 
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'C:\Users\xxxxx\Project\zzzzz\node_modules\@storybook\cli\bin\index.js'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) 
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Additional context

No response

@shilman
Copy link
Member

shilman commented Jan 27, 2024

Can you provide more information about your setup? Which package manager & version specifically?

@AS-EBaiden
Copy link
Author

AS-EBaiden commented Jan 29, 2024

Can you provide more information about your setup? Which package manager & version specifically?

We built it on a monorepo, our pnpm is our package manager. it is v8.8 which is installed globally

@JReinhold
Copy link
Contributor

This might have been fixed by #25752 released in 7.6.12, could you try running npx storybook@latest upgrade again and see if it works now?

Copy link
Contributor

Hi there! Thank you for opening this issue, but it has been marked as stale because we need more information to move forward. Could you please provide us with the requested reproduction or additional information that could help us better understand the problem? We'd love to resolve this issue, but we can't do it without your help!

@github-actions github-actions bot added the Stale label Feb 22, 2024
@AS-EBaiden
Copy link
Author

This might have been fixed by #25752 released in 7.6.12, could you try running npx storybook@latest upgrade again and see if it works now?

It is now working as expected, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants