-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Not working with pnpm #13428
Comments
Any |
also have this problem, but if i remove |
The issue can be traced to this line:
The issue could potentially be resolved by defaulting Workaround details: In
to:
Hope it at least helps someone get unblocked. |
The suggestion above fixed original issue but now I get this error message:
|
I can't reproduce that issue following a fresh install using your steps above (changing step 3 to Using: What version of pnpm and node are you running? Have you added additional configuration that references |
Not sure if I should create a new ticket or not but this is what's happening for me now.
babel config
But now I get a dependency conflict:
|
I think my new issue is related to this actually: #13593 |
Any news on this? |
I encountered this same problem. PNPM is the 3rd most popular package manager for Node.js. It has a huge user base, particularly for large corporate monorepos. What can we do to get PNPM support? |
Some workarounds can be found in #12995 (comment) |
If you want this fixed, please upvote by adding a 👍 to the issue description. We use this to help prioritize! |
Besides installation, also build failed, so, you have to explicitly hoist such dependencies. Example
|
Any improvements in this? |
@shilman 50 upvotes is quite a few |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Given that pnpm is now shipped with Node along side npm and yarn, and this issue is still valid, it's probably wise to find someone on the team willing to pick it up. @zkochan would any of the new options around hoisting/flat enable compatibility with storybook? |
with |
This might be related: #17375 |
@gaetanmaisse just a mild soft ping for you here ❤️ |
None of the workarounds except this one work for me, essentially disabled pnpms best feature :\
|
For the really anxious out there, I've put together this branch that simulates it working with Vite Couldn't get MDX files supported there so if you have MDX don't even try |
Ah, you're not using a |
As for @IPWright83 what error are you getting, and what framework are you using? |
Hey @IanVS, my issue is possibly slightly different but I thought I'd be bumped here if I raised a new one. It's a pnpm monorepo with workspaces (though just 2 packages currently) using React. It's the
So it manifests in the same sort of way.
Slightly oddly is I can get it working locally fine (on Ubuntu) but it always fails on Windows and in CI where I'm trying to use https://github.com/storybookjs/storybook-deployer and it falls over delegating to the build-storybook call. |
The latest alpha version of storybook will now use pnpm to install dependencies when you run For those of you who were not able to install storybook at all (e.g. due to pnpm workspace), this should fix your issue. You can now run The other main pnpm issue is with the way storybook relies on hoisting. We've made some progress there, but are still working on it. For now, I think the best workaround is still to use |
@IanVS I realised why the public-hoist-pattern doesn't work for me. It's not supported for workspace dependencies which is where Storybook is failing for me pnpm/pnpm#3642. Still going to try the alpha and see if there's any improvement. |
@amery what do you mean it's still needed? It should work properly, if not, can you explain the issue you're having? |
on a pnpm workspace going into |
Yes, sb@latest (6.5) will not work. You need to use 7.0, which is still in alpha, which you can use with |
@IanVS not complaining, I misread the date of the post. I thought it was October 2019 and wanted to inform newcomers the solution still applied. |
No worries! We know folks like using PNPM and I'm on a mission to make Storybook work correctly with it out of the box. It's just been a bit tricky, is all, but we're getting close. |
PNPM should be fully supported by Storybook now in the latest beta versions of 7.0. If you're still experiencing any issues after updating with Thanks for your patience, everyone. I'm excited that I'm one step closer to being able to use pnpm in my own projects now too! |
Pnpm still doesn't work for me. Module not found: Error: Can't resolve 'style-loader' sb : v7.0.0-beta.17 P.S : There is no problem with the Yarn |
@ArianHamdi can you please open a new issue with a link to a reproduction, so we can investigate? |
Works great even with |
Here is the issue : #20468 |
|
Thank you! |
I faced an issue with the version 7 (7.0.7). |
I discovered that my issue involved |
work it. thx :) |
this should be added to docs |
Describe the bug
Installation with pnpm doesn't work.
To Reproduce
Steps to reproduce the behavior:
In a new folder...
pnpx create-react-app app
cd app
pnpx sb-init
rm -rf node_modules
pnpm i
pnpm run storybook
Expected behavior
Starts normally.
Screenshots
System
Additional context
At first blush, it appears that the problem is that storybook can't find the location of react-scripts.
Apparently, while npm symlinks
node_modules/.bin/react-scripts
, pnpm puts in place a hardlink. This messes withcra-config.ts
, which can't resolve the location of the package.The text was updated successfully, but these errors were encountered: