I'm learning MERN stack project where I've proxy the frontend to backend on localhost. Everything works fine until I stop the react application to install some modules and then, on hitting the npm start
command, I receive following errors:
The list goes on
Previous time when this happened, I received similar errors (like: can't resolve 'fs', 'onAfterSetupMiddleware' is deprecated, etc). I created a new folder named "frontend2" and used create-react-app
command, installed all the dependencies again, and replicated the source files from original "frontend" folder. This worked till I again terminated the react app, after which I'm receiving new errors. I don't want this to keep happening and hence searching for a permanent solution.
Try Deleting your node modules and Package Lock json and install all the dependencies through npm install