-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
BaseUrl not respected with new create-react-app 3.0 version #6574
Comments
This may already be addressed here: #6560 |
Thanks @mrmckeb for the info and your PR. :) I will test it later today and report back here. |
I am having trouble building the project since I am on Windows, and there are plenty of python, shell build scripts referenced in package.json. Also tried to build it on a colleagues Mac (briefly) but didn't work there either. Can you by any chance send me a dist build of your branch that I can npm link in my project? P.S. create-react-app 3.0 just got released. :) |
In the interim, you can still use Give me a few hours and I'll try to get this out, worst case, end of day today (EEST). |
If you can try https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.33, that would be amazing. Please let me know immediately if you have any issues. |
i just upgraded from CRA 2.1.8 to 3.0.0, and then @storybook/react 5.0.6 to 5.1.0-alpha.33 and receive an error in the terminal:
EDIT: Nevermind, forgot to update other storybook dependencies as well (addons etc.) |
Hi @mrmckeb, I confirm it works now after i set also the .env |
Hi @jakoandersen, hmm... that error looks completely unrelated to this work... To confirm, did you remove all If you keep receiving the above error, can you please open an issue for that? @SpearThruster, no, the merged PR means no We'll close this off once we can confirm it's working for you both. |
Also, @jakoandersen, did you upgrade all |
Hi @mrmckeb. I updated the repo above with the latest alpha from storybook and it's still failing unless I also set NODE_PATH=src in .env. |
Hi @SpearThruster, are you able to share the repo with me (even privately) and I can take a quick look? Also, the temporary workaround doesn't need to be in
|
Hi @mrmckeb - yes after upgrading all storybook related plugins and addons to 5.1.0-alpha.33 it works :) |
Thanks @jakoandersen, and are you able to use |
I'm able to get it working with |
😌 That's good to know, thanks @jakoandersen. @SpearThruster, let me know if you can give me access and I'll investigate - it might be our issue, but I just need a reproduction. |
Hi @mrmckeb -> you can clone the repo above (https://github.com/SpearThruster/storybook5-and-create-react-app3) which contains the latest storybook alpha and cra 3.0.
|
Hi @SpearThruster, I've found your issue - it seems that you're pinned to
This is because |
Closing this as all issues seem to be resolved. Thanks everyone for your time here :) |
Ugh, you are absolutely right! Thanks for that, it definitely works now. Cheers! |
Thanks guys! Great job @mrmckeb 👏 |
No problem @shilman. And don't stress @SpearThruster, I probably should have considered that case... and in future will ;) |
|
@egor-xyz, this should not be needed in new versions. Are you still seeing this issue? If so, what versions of Storybook and CRA are you using? |
Working only with:
Otherwise:
|
@egor-xyz I am pretty sure you need one of the |
@SpearThruster Yes, working with beta
|
Correct, as @SpearThruster said, you need to be on the next branch. This will be released very soon :) |
fyi in |
Hi @akeating, are you using the new standalone preset? |
Yes I'm using |
Thanks @akeating, can you please raise an issue against that preset (https://github.com/storybookjs/presets/issues) with any details you can provide? I can take a look this week and resolve. |
Describe the bug
Even better here is a repro case -> https://github.com/SpearThruster/storybook5-and-create-react-app3
To Reproduce
Expected behavior
The baseUrl should be respected and the component path
import { RoundedButton } from "components/RoundedButton"
should be resolved.Screenshots
not applicable
Code snippets
If applicable, add code samples to help explain your problem.
System:
Additional context
Tried various combinations from the docs regarding TypeScript + storybook (with cra) to no avail.
** console output
ERROR in ./src/stories/index.stories.tsx Module not found: Error: Can't resolve 'components/RoundedButton' in 'D:\Projects\storybook5-and-create-react-app3\src\stories' @ ./src/stories/index.stories.tsx 5:0-57 9:29-42 25:29-42 @ ./src sync .stories.tsx$ @ ./.storybook/config.ts @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.ts (webpack)-hot-middleware/client.js?reload=true
The text was updated successfully, but these errors were encountered: