Intro
You may find this post helpful IF you,
- initialized a project using CRA
- in my case, I used
npx create-react-app myApp - template redux-typescript
- installed storybook using
npx sb init
on top of CRA settings -
npm start
oryarn start
throws an error regarding webpack(4.44.2) and/or babel-loader(8.1.0) package
I tried all possible methods listed on StackOverflow and other blogs. However, I just wanted to share the one that fixed my issue.
Some suggest using the SKIP_PREFLIGHT_CHECK
flag; it won't resolve the issue but only covers the matter.
A part of the logged out instructions
There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.
The react-scripts package provided by Create React App requires a dependency:
"webpack": "4.44.2"
What worked in my case
In package.json
, add the option below
"optionalDependencies": {
"babel-loader": "8.1.0" // or webpack if it's the one causing the error.
}
Here's the link to the StackOverflow post.
Top comments (0)