简体   繁体   中英

Unmet Peer Dependency (WebPack)

Anybody knows why I am still having a missing dependency error, even though it clearly shows the correct version of webpack is already installed below??

When I ran npm start :

''' 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.41.5" Don't try to install it manually: your package manager does it automatically. However, a different version of webpack was detected higher up in the tree:

When I run npm ls webpack, it gives me :

 Chelseas-MacBook-Pro:website-expo-2018-master ipchelsea$ npm ls webpack uwbce@0.1.0 /Users/ipchelsea/Desktop/website-expo-2018-master ├─┬ react-loading-screen@0.0.17 │ └── webpack@2.7.0 ├─┬ react-scripts@3.4.0 │ └── webpack@4.41.5 └── webpack@4.41.6

You missed out the steps you took to get here. You did something, or missed something out in the steps you did to end up where you are now.

You should delete node_modules , then do npm i , and see if that correctly installs the packages.

Also, add the contents of your package.json file to the question. You need to have one in the root of this project.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM