Hey everyone, I'm completely new to using frameworks and I'm having trouble getting started with React. I'm trying to run my app using npm start, but I keep getting a 'Failed to compile' error message. I'm not sure what's going wrong, and I could really use some help. Also that after I hit npm start the react app actually launches to the browser but it won't refresh automatically so I think one of the effects of the error message.
Here's what the error message looks like:
`Failed to compile.
Module not found: Error: Can't resolve 'D:#code\React Exercise\my-first-react\node_modules\webpack-dev-server\client\index.js?protocol=ws%3A&hostname=0.0.0.0&port=3000&pathname=%2Fws&logging=none&overlay=%7B%22errors%22%3Atrue%2C%22warnings%22%3Afalse%7D&reconnect=10&hot=true&live-reload=true' in 'D:#code\React Exercise\my-first-react'
ERROR in Module not found: Error: Can't resolve 'D:#code\React Exercise\my-first-react\node_modules\webpack-dev-server\client\index.js?protocol=ws%3A&hostname=0.0.0.0&port=3000&pathname=%2Fws&logging=none&overlay=%7B%22errors%22%3Atrue%2C%22warnings%22%3Afalse%7D&reconnect=10&hot=true&live-reload=true' in 'D:#code\React Exercise\my-first-react'
webpack compiled with 1 error
`
I've tried looking up solutions online, but I'm having trouble understanding some of the technical jargon. I'm not even sure where to start looking for the problem. Could someone help me out and explain what might be causing this error, and how I can fix it?
I'd really appreciate any help or guidance that you could offer. Thanks in advance!
Top comments (2)
Remove
package-lock.json
and runnpm install
It looks like you're following a really old tutorial. Better to do the official one: react.dev/learn/tutorial-tic-tac-toe