Cannot uninstall webpack from react-script
Create a .env
file in the root directory of the project and add this line SKIP_PREFLIGHT_CHECK=true
inside the file.
then try to run yarn start
.
To solve this issue I had to uninstall webpack and webpack-dev-server from the node-modules folder and then install them again but with different versions.
Open cmd on the node-modules folder outside of your project folder
Uninstall webpack and webpack-dev-server:
npm uninstall webpacknpm uninstall webpack-dev-server
Delete the node-modules folder and the package-lock.json file from your project's folder.
Open the node-modules again
npm install webpack@4.19.1npm install webpack-dev-server@3.1.9
Use this command on your project folder
npm install
It did the trick for me, hope it helps you too.
One solution I had was to go to my "Home" folder and delete the node_modulesfolder and package-lock.json file.
Worked afterwards.