-
-
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
[Bug]: storybook init
fails in turbo + sveltekit + pnpm monorepo
#28563
Comments
** Disclaimer** This information might be inaccurate, due to it being generated automatically
These steps should help resolve the initialization issue in your specific setup. References/code/frameworks/sveltekit
|
@cge-taal Here are some suggestions:
|
Thanks a lot @shilman - admittedly I've deliberately tried to stick only to the basics, as a test for maturity of SvelteKit and its surrounding ecosystem. It is already good to have your feedback that version 8.2 of Storybook is known to be a little rough on the edges still - in as far as SvelteKit support is concerned. I'll update the ui package to be closer to another version I have somewhere - which resembles a so-called "SvelteKit library skeleton project" (or similar). Hopefully the end result is clarity on which versions of libraries to stick with to have full integration capabilities. With this knowledge perhaps even turborepo could be updated to have more realistic basics included for its SvelteKit starter. |
By the way, my real use-case is to have Storybook working fully in the monorepo environment mentioned. As far as I'm aware, Storybook still needs to use the Will that still be the case for Storybook >= 8 ? Given support for Actual working examples would be wonderful to see. I've seen mostly open tickets and it is not really clear which versions of which libraries and APIs to go with. Related ticket: storybookjs/addon-svelte-csf#188 |
Apologies @shilman , I was busy with other things. So I tried your advice. Here are my steps npx create-turbo@latest -e with-svelte storyrepo
cd storyrepo
mkdir apps/storybook
cd apps/storybook At this point I did exactly as you suggested: SvelteKit is nowhere to be found in the project templates - please see the attached. This leads me to believe there is no SvelteKit support in the tooling and I cannot find a latest example that works. My next steps will include "lots of trial and error doing different things" as someone on Svelte Discord suggested. |
@cge-taal the typical use of as it says above on the empty folder init that you screenshotted: ![]() |
Thanks again @shilman for your continued help. Yes I did create a repo to illustrate what you suggest: https://github.com/cge-taal/storyrepo Repeating the steps here npx create-turbo@latest -e with-svelte storyrepo # choose pnpm
cd storyrepo/apps
npm create svelte@latest storybook # Choose Library project and TS. Don't add Svelte5
cd storybook And then Thanks! |
Hi @shilman , it has been a while. Just wanted to give an update on this. The example repo I made lists steps that work in its readme : https://github.com/cge-taal/storyrepo As you'll see there, the Furthermore, I have a strange error, that I'm sadly not able to reproduce in a small example, but I've narrowed down when it happens. In my When I write stories in my However, this sometimes gives me the following error when running storybook and trying to view the applicable component:
When I rename the stories file to Perhaps you might know why that happens. For now at least it seems I have a workaround via different file naming. |
Describe the bug
In trying to solve Storybook support for Svelte 4 and Storybook 8, I've run across some issues.
When attempting a new turbo + sveltekit + pnpm monorepo,
storybook init
fails.Please see the linked repository for more details.
Reproduction link
https://github.com/cge-taal/test-sveltekit-storybook
Reproduction steps
No response
System
Storybook Environment Info: System: OS: macOS 13.5.1 CPU: (10) arm64 Apple M1 Pro Shell: 5.9 - /bin/zsh Binaries: Node: 20.14.0 - /usr/local/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 10.7.0 - /usr/local/bin/npm pnpm: 9.4.0 - /opt/homebrew/bin/pnpm <----- active Browsers: Safari: 16.6
Additional context
No response
The text was updated successfully, but these errors were encountered: