babel-loader version required by StoryBook conflicts with create-react-app version
See original GitHub issueDescribe the bug
This is the same issue previously described in https://github.com/storybookjs/storybook/issues/13108 , https://github.com/storybookjs/storybook/issues/11275 and elsewhere.
When running yarn test the following errors are displayed:
Manually installing incompatible versions is known to cause hard-to-debug issues.
If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.
To fix the dependency tree, try following the steps below in the exact order:
1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
2. Delete node_modules in your project folder.
3. Remove "babel-loader" from dependencies and/or devDependencies in the package.json file in your project folder.
4. Run npm install or yarn, depending on the package manager you use.
In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:
5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
This may help because npm has known issues with package hoisting which may get resolved in future versions.
6. Check if /Users/jseidel/ppg/hall/winter-spa/node_modules/babel-loader is outside your project directory.
For example, you might have accidentally installed something in your home folder.
7. Try running npm ls babel-loader in your project folder.
This will tell you which other package (apart from the expected react-scripts) installed babel-loader.
If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That would permanently disable this preflight check in case you want to proceed anyway.
P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!
error Command failed with exit code 1.
I have followed all the steps described and it does not resolve the issue.
I have also upgraded create-react-app to version 4.0.3.
Running npm ls babel-loader shows the problem:
winter-web-app@0.1.0 /Users/jseidel/ppg/hall/winter-spa
βββ¬ @storybook/addon-essentials@6.2.1
β βββ¬ @storybook/addon-docs@6.2.1
β βββ¬ @storybook/builder-webpack4@6.2.1
β βββ babel-loader@8.2.2 deduped
βββ¬ @storybook/react@6.2.1
β βββ¬ @storybook/core@6.2.1
β β βββ¬ @storybook/core-server@6.2.1
β β βββ babel-loader@8.2.2 deduped
β βββ¬ @storybook/core-common@6.2.1
β βββ babel-loader@8.2.2 deduped
βββ babel-loader@8.2.2
Storybook is requiring babel-loader v8.2.2, while create-react-app needs v8.1.0
To Reproduce Steps to reproduce the behavior:
- Go to ββ¦β
- Click on ββ¦β
- Scroll down to ββ¦β
- See error
Expected behavior Tests should run without error
Screenshots Error shown above is the problem.
Code snippets If applicable, add code samples to help explain your problem.
System
Please paste the results of npx sb@next info here.
Environment Info:
System:
OS: macOS 10.15.7
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Binaries:
Node: 14.12.0 - ~/.nvm/versions/node/v14.12.0/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.8 - ~/.nvm/versions/node/v14.12.0/bin/npm
Browsers:
Chrome: 89.0.4389.90
Firefox: 74.0
Safari: 14.0
npmPackages:
@storybook/addon-actions: ^6.1.20 => 6.2.1
@storybook/addon-contexts: ^5.3.21 => 5.3.21
@storybook/addon-essentials: ^6.1.20 => 6.2.1
@storybook/addon-knobs: ^6.1.20 => 6.2.1
@storybook/addon-links: ^6.1.20 => 6.2.1
@storybook/addon-storysource: ^6.1.20 => 6.2.1
@storybook/node-logger: ^6.1.20 => 6.2.1
@storybook/preset-create-react-app: ^3.1.6 => 3.1.7
@storybook/react: ^6.1.20 => 6.2.1
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:12
- Comments:5 (1 by maintainers)

Top Related StackOverflow Question
Yes I have this issue also
@GDC6203 Already tried that β does not work