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
change init script of storybook #7695
Conversation
there is no package named 'tsconfig'. Replaced it with the correct name which is '@repo/typescript-config'
It wasn't being used at all.
By running `pnpm dlx sb init --skip-install` and `pnpm install --save-dev @storybook/cli` storybook doesn't get added to the vite app properly and run into `esbuild postinstall error` which fails to start storybook. Although by running `pnpm dlx sb init` everything works and storybook and the dependencies get installed properly.
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 7 Ignored Deployments
|
@zsh77 is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
@@ -78,8 +78,7 @@ Next, we need to scaffold Storybook: | |||
|
|||
```shell | |||
cd workshop | |||
pnpm dlx sb init --skip-install | |||
pnpm install --save-dev @storybook/cli # Manually install deps and CLI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I specifically remember having to go through these steps in this order as the only way I could get it to work.
I think the Storybook team has released two majors since I wrote this doc, though, some some things may have changed. Can you confirm that you tested this manually?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anthonyshew yes I've got some screen shots just now to make sure once again that this works. Let me show you.
...
Although this was just now with storybook version 8.0.0 .When I openeed this PR a couple of days ago the stable version of storybook was 7.6 and this also worked fine and adding storybook without installing dependencies was running into errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how you feel about it, but I thought maybe including this link :
https://github.com/storybookjs/addon-onboarding/blob/main/README.md
in the dos would be beneficial and time saving in order to follow the instructions to uninstall @storybook/addon-onbording.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for going the extra mile with the screenshots! 🙏
I'm okay with that link! Feel free to add that and then I'll approve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 🙏
It's all done. Please let me know if you know a better way to document it.
With SB8 and with turbo@1.13.0, I'm unable to make the SB work properly with the current guide + the guide defined in this PR. Might require additional configuration to get it work with SB8. Note: I have added the dependency of UI as so I have also tried methods in this thread with no luck: #620 |
@tounsoo the error also happens if there are no exports like "." in the ui's package.json while you're using
because the package.json of ui package exports button.ts file as |
@zsh77 Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thank you!
### Description - fixed the init script of storybook on the `npm` tab, (the exact changes we had in the PR: #7695 using npm instead of pnpm) - replaced `ui` with `@repo/ui` - bug fix of importing a button from an undefined export specifier ### Testing Instructions Going through with the process of adding storybook to turborepo should work fine which is: - cd apps - npm create vite - cd workshop - npx sb init Co-authored-by: Anthony Shew <anthony.shew@vercel.com>
Description
By running
pnpm dlx sb init --skip-install
andpnpm install --save-dev @storybook/cli
storybook doesn't get added to the vite app properly and run intoesbuild postinstall error
which fails to start storybook. Although by runningpnpm dlx sb init
everything works and storybook and the dependencies get installed properly.Testing Instructions
Going through with the process of adding storybook to turborepo should work fine which is:
cd apps
pnpm create vite
.npmrc
:cd workshop
pnpm dlx sb init