-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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]: Error installing storybook in monorepo #20726
Comments
Same issues with node Tested with the latest storybook 6.5 as well as 7.0.0-beta.31. |
I was able to perform the process on Node v16.15.0 |
What have you done to get this working? I have the following NPM workspace setup for my monorepo:
where both "workspaces": [
"assets/packages/*",
"assets/apps/*"
] I've then create a new vuejs3 app in the Looking at the debug logs, this seems to be related to storybook calling the Quote form the docs:
Are you doing sth. different than what I've described? Complete npm log file (with a censored path)0 verbose cli /usr/local/Cellar/node/19.3.0/bin/node /usr/local/bin/npm 1 info using npm@9.3.1 2 info using node@v19.3.0 3 timing npm:load:whichnode Completed in 0ms 4 timing config:load:defaults Completed in 2ms 5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms 6 timing config:load:builtin Completed in 1ms 7 timing config:load:cli Completed in 1ms 8 timing config:load:env Completed in 1ms 9 info found workspace root at /Users/johannes/Programming/organisation/SaaS/project/project 10 timing config:load:file:/Users/johannes/Programming/organisation/SaaS/project/project/.npmrc Completed in 0ms 11 timing config:load:project Completed in 10ms 12 timing config:load:file:/Users/johannes/.npmrc Completed in 1ms 13 timing config:load:user Completed in 1ms 14 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms 15 timing config:load:global Completed in 0ms 16 timing config:load:setEnvs Completed in 1ms 17 timing config:load Completed in 18ms 18 timing npm:load:configload Completed in 18ms 19 timing npm:load:mkdirpcache Completed in 0ms 20 timing npm:load:mkdirplogs Completed in 0ms 21 verbose title npm config get legacy-peer-deps 22 verbose argv "config" "get" "legacy-peer-deps" "--location" "project" 23 timing npm:load:setTitle Completed in 2ms 24 timing config:load:flatten Completed in 2ms 25 timing npm:load:display Completed in 4ms 26 verbose logfile logs-max:10 dir:/Users/johannes/.npm/_logs/2023-01-23T19_51_39_486Z- 27 verbose logfile /Users/johannes/.npm/_logs/2023-01-23T19_51_39_486Z-debug-0.log 28 timing npm:load:logFile Completed in 13ms 29 timing npm:load:timers Completed in 0ms 30 timing npm:load:configScope Completed in 0ms 31 timing npm:load Completed in 38ms 32 timing command:config Completed in 2ms 33 verbose stack Error: This command does not support workspaces. 33 verbose stack at Config.cmdExec (/usr/local/lib/node_modules/npm/lib/base-command.js:123:29) 33 verbose stack at Npm.exec (/usr/local/lib/node_modules/npm/lib/npm.js:154:20) 33 verbose stack at async module.exports (/usr/local/lib/node_modules/npm/lib/cli.js:134:5) 34 verbose cwd /Users/johannes/Programming/organisation/SaaS/project/project/assets/apps/mc-storybook 35 verbose Darwin 22.2.0 36 verbose node v19.3.0 37 verbose npm v9.3.1 38 error code ENOWORKSPACES 39 error This command does not support workspaces. 40 verbose exit 1 41 timing npm Completed in 50ms 42 verbose code 1 43 error A complete log of this run can be found in: 43 error /Users/johannes/.npm/_logs/2023-01-23T19_51_39_486Z-debug-0.log |
I only changed the version of Node.js My package.json:
|
I can normal install this lib, always when i want use sb i must fixed 10 errors wtf? same error.... |
Hit this issue also with Node v19.6.0 It worked correctly after downgrading to Node v16.19.0 |
Also hit this issue, with Node v19.6.0, 19.5.0, 18.14.0 Downgrading to Node v16.19.0 resolved the problem but is definitely not ideal |
Same. With npm v18 |
getting the same error, following the turborepo guide at https://turbo.build/repo/docs/handbook/tools/storybook, on node 16.19.1 |
Same error with Node v18.14.2 and npm 9.6.0 |
Think this is a turborepo / npm bug, not storybook. I have the same issue, and i dont have storybook installed. npm 9.50 |
I am getting the same error while using turborepo with npm and nextjs. My dependencies are installing but when I start the dev server I see the following.
node 18.15.0 |
Having the same issue |
I also faced this issue with Turborepo and React. So, it remains.
|
FYI same error in nextjs. I hope it may help |
Can someone provide a minimal reproduction? https://storybook.new |
@valentinpalkovic thank you for your response, so to reproduce it, do you need some examples on StackBlitz or some similar platform? |
You can also just provide a GitHub Repo with the minimal reproduction. |
Hi there! Thank you for opening this issue, but it has been marked as |
I'm afraid we need to close this issue for now, since we can't take any action without the requested reproduction or additional information. But please don't hesitate to open a new issue if the problem persists – we're always happy to help. Thanks so much for your understanding. |
not yet resolved |
** Disclaimer** This information might be inaccurate, due to it being generated automatically
npx storybook@latest init --package-manager=npm
pnpm dlx storybook@latest init --package-manager=npm
yarn dlx storybook@latest init --package-manager=npm Source: /docs/_snippets/init-command-custom-package-manager.md
npm install @storybook/builder-vite --save-dev
pnpm add --save-dev @storybook/builder-vite
yarn add --dev @storybook/builder-vite Source: /docs/_snippets/storybook-vite-builder-install.md npm install --save-dev @storybook/react-vite
pnpm add --save-dev @storybook/react-vite
yarn add --dev @storybook/react-vite Source: /docs/_snippets/react-vite-install.md
npm install @storybook/addon-essentials --save-dev
pnpm add --save-dev @storybook/addon-essentials
yarn add --dev @storybook/addon-essentials Source: /docs/_snippets/storybook-addon-essentials-install.md These steps should help address the installation issues in a monorepo environment. References/docs/_snippets/init-command.md
|
Reproduction:
Error message:
|
@vanessayuenn, Can we add this to the empathy backlog? I was finally stumbling upon a reproduction (see above). Let's fix this quickly because initializing Storybook in projects using npm/yarn workspaces is not working, and |
I'm removing the |
Describe the bug
Error installing storybook in monorepo
Node - v18.13.0
NPM - 9.3.1
When running the command:
npx storybook init
or
npx storybook init --builder @storybook/builder-vite --type react --use-npm
this error occurs:
To Reproduce
No response
System
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: