Emre Kızıltoprak
Emre Kızıltoprak

Reputation: 73

React App dependency conflict with webpack-server

npm WARN config global --global, --local are deprecated. Use --location=global instead. npm ERR! code ERESOLVE npm ERR!
webpack-server@"^0.1.2" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See C:\Users\Emre Kızıltoprak\AppData\Local\npm-cache\eresolve-report.txt for a full report.

Package json:

"dependencies": {
    "@babel/core": "^7.18.9",
    "@babel/plugin-transform-runtime": "^7.18.9",
    "@babel/preset-env": "^7.18.9",
    "@babel/preset-react": "^7.18.6",
    "babel-loader": "^8.2.5",
    "css-loader": "^6.7.1",
    "html-webpack-plugin": "^5.5.0",
    "node-sass": "^7.0.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "sass-loader": "^13.0.2",
    "style-loader": "^3.3.1",
    "webpack": "^5.73.0",
    "webpack-dev-server": "^4.9.3",
    "webpack-server": "^0.1.2"

  },
  "devDependencies": {
    "webpack-cli": "^4.10.0"
  }

I created a react app without create-react-app. I did my setup manually. Now iam getting a dependency conflict. It is gone when i remove webpack server or with the usage of --legacy-peer-deps. But i do not want to force things. Is there anyone with real solution ?

Upvotes: 0

Views: 350

Answers (1)

Glitchy Sage
Glitchy Sage

Reputation: 1

Unsure which tutorial you are following, but if it is this one: https://www.linkedin.com/pulse/create-react-app-without-create-react-app-cra-elhousieny-phd%25E1%25B4%25AC%25E1%25B4%25AE%25E1%25B4%25B0/?trackingId=tP9OVj7YQxCNKYXrT5zD1A%3D%3D

I ran into the same issue, I removed Webpack-server, as most other tutorials do not include it. Since removing it seems to be work.

Upvotes: 0

Related Questions