-
-
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
Using create-react-app --typescript and sb init does not work out of the box #5028
Comments
This is a strange one. Have been exploring it with @tmeasday and it appears to be a
As for generating |
Updated workaround above. Not sure what to do about this one. @tmeasday do you have a minimal repro we can post as a |
Here's the simplest reproduction I can make: create-react-app test-app; cd test-app;
# works
yarn start
yarn add --dev @storybook/react@^4.2.0-cra-debug.0 @babel/core@^7.2.2
# fails
yarn start
rm -rf node_modules && yarn
# works
yarn start |
It's frustrating as this is not really our fault (how can it be? we broke CRA simply by being installed into it) For the record, the reason the issue occurs is: In some circumstances (that seem extremely random), So it seems like a bug with Babel seems to assume that transitive dependencies will always be installed at the top-level so you can |
wasn't this issue fixed? |
It looks like CRA2.1.2 (probably unintentionally) fixed this problem. My repro above and npx create-react-app test-app;
cd test-app
npx @storybook/cli@next init
yarn start both seem to work fine now. @shilman I guess we can probably close this now? |
Can you try |
Can confirm, it works again 👍
|
I tried the new SB v5.0 today and experienced the exact same bug, except I'm not using the Typescript-CRA, just "default" CRA v2. Also I'm using Yarn v1.13.0. What I did:
Resolved it with the workaround mentioned above: Please let me know, if I shall open a new ticket regarding this behavior. EDIT: maybe it's a good idea to add this workaround to the docs, mentioning that sometimes clearing the |
Describe the bug
Currently
create-react-app storybook-react-typescript --typescript
does not work together withsb init
To Reproduce
Steps to reproduce the behavior:
create-react-app storybook-react-typescript --typescript
sb init
Throws
Expected behavior
.tsx
extension instead of.js
Screenshots
If applicable, add screenshots to help explain your problem.
Code snippets
If applicable, add code samples to help explain your problem.
System:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: