I am trying to create a react app with the below steps:
And I get this error:
In error have suggestion to remove webpack dependency but i cant do that because in file package.json dun have that. Here my package.json
For additional information:
Do step number 6 and delete that babel loader or webpack folder and you will be good afterwards. Chances are you have an outdated web pack or babel that you installed in a previous project.
I just had this very issue, and turns out to be something simple
The part of the log that says about there being a
"a different version of webpack was detected higher up in the tree"
looks to be the same case for you. I think you may have ran npm install
at some point under D:\\bolehDiHapus and so have node_modules installed further up the tree that you meant.
I simply changed the name of D:\\bolehDiHapus\\node_modules (probably best to just delete it) and hey presto npm start
works.
I had this same issue, first it started saying we found the wrong version farther up in the tree, and then i had to delete webpack up there, and then i had install their "required version" even if it is lower than latest.
npm install webpack@version --save
in your case: npm install --save webpack@4.19.1
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.