-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
babel-loader conflicts with create-react-app version #5183
Comments
+1 |
Does this mean we should not install |
Hmm when I remove |
Having the same issue 😕 |
Same issue... any workaround yet? |
@ayoola-moore Yes, the workaround is to change the line in
This way both cc @artisologic @YoannDelpierre @ovionlogis @patricknick @mrmckeb @ivnkld @viniciusreiss @dlevs @Jipperism @euskonadox @fuadajip @AMTourky @greatermeans @tmeasday @Eugene-Sviridov @nerfologist |
@shilman, I'm also thinking about this. We could consider exposing Alternatively, would it just be easier if this was a dependency of Or, we could, when |
@igor-dv @ndelangen @tmeasday any opinions on the options that @mrmckeb has laid out above? Is this something we can handle with a CRA preset? |
The workaround doesn't seem to work for me. I still see the conflicts after trying the workaround. |
Make sure you remove the leading "^" otherwise you will still get 8.0.5 |
I think we could probably require A preset would make that nicer but I think we already have special case code for CRA (to use it's config) so maybe it would be relatively easy to do this there? |
This is what I have in my package.json: "babel-loader": "8.0.4" Are there other steps that need to be taken for the work around? |
@jlmelis, what version of "react-scripts" is installed? I can confirm that for "react-scripts": "2.1.3" workaround seem to be working fine |
@vsubbotskyy - I am running create-react-app with npx. The version it shows is 2.1.3. Something probably else screwy with my set up. I'll just keep an eye on this to see if a fix comes through. Thanks! |
I was able to get the work around working. Thanks |
I had a look around, and I think at this stage it'll be easier to require in the loader from CRA (when CRA is used). I'll make a PR now. |
I have been through the same issue and finally fixed it. I changed the babel-loader back to "8.0.4"in my package.json file and needed to delete the package-lock json file and I was then able to start and test with storybook. I hope this is helpful. |
storybookjs/storybook#5183 Explicitly set the version of babel-loader to 8.0.4
@tsirolnik same fix as #5183 (comment) with updated version required by react-scripts i.e. |
This is still an issue...
|
This is an issue for me as well, and I'm not even using yarn. I have a lerna monorepo with npm. There are two sibling packages. One component library with storybook, the other made with create react app. Latest versions of everything. When I try to import the babel-transpiled component library into the CRA, I get the error listed in this issue. I have to manually set the version: I have to hoist the dependencies to avoid the duplicate react issue. But if I do then I have to deal with this babel-loader version issue. |
Yeah same issue here, thankfully the resolutions method fixed it right up for me. It seems like a fragile fix though, since it will probably break when CRA starts relying on features in a newer version of babel-loader. Hoping for a fix soon as well, we can only hope the CRA team will do something about this :) |
@cryptoAlgorithm pretty sure it's fixed in CRA5 which is due out any week now |
What happen engineers? Do u need help with this huge error? XD A big project that not works no helps so much! |
|
Solve
However if I use |
When I'm changing "babel-loader": "8.1.0" - I'm getting the same issue with |
@egor-xyz I have the same Mine is
|
It's not good solution but it works for now. I hope it will be fixed with CRA 5 |
This appears to be fixed in CRA5. I'm closing this for now. Please let me know if there's more to be done here! |
@72gm Just came across your message, it seem's to work as expected though I'm confused why and how. Wonder what they did to fix this issue. |
@AlexMachin1997 They ( |
That's it. It will fix the issue. |
This fixed it for me. |
The
Though you need npm >= 8.3 |
This worked for me. I also needed to override the webpack version like this: {
"overrides": {
"babel-loader": "8.1.0",
"webpack": "4.44.2"
}
} I'm using |
Hi. Will someone kindly tell me how to unclone a computer? My "friend" is a fuckwad.
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Klaus Kazlauskas ***@***.***>
Sent: Monday, September 26, 2022 12:15:57 PM
To: storybookjs/storybook ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [storybookjs/storybook] babel-loader conflicts with create-react-app version (#5183)
The npm equivalent would be to use overrides:
"overrides": {
"babel-loader": "8.1.0"
}
Though you need npm >= 8.3
This worked for me. I also needed to override the webpack version like this:
{
"overrides": {
"babel-loader": "8.1.0",
"webpack": "4.44.2"
}
}
I'm using Storybook v6.5.0, react-scripts v4.0.3, and React v16.13.0.
—
Reply to this email directly, view it on GitHub<#5183 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ARIPUD4I3N4O2TPD3BMTTNTWAHK43ANCNFSM4GOW77AQ>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Describe the bug
After creating a new project with create-react-app
yarn start
andyarn test
do not run.There is a conflict with babel-loader version.
Changing the line in package.json to
"babel-loader": "8.0.4"
seems to fix it.To Reproduce
Steps to reproduce the behavior:
npx create-react-app taskbox
npx -p @storybook/cli sb init
yarn test
Expected behavior
Should run the tests.
Code snippets
Here are the versions installed:
System:
The text was updated successfully, but these errors were encountered: