sandeepvarma
sandeepvarma

Reputation: 9

Error "Module not found" while create-react-app and npm start

I am trying to run create-react-app and after entering npm start I am getting this error

Failed to compile.

Module not found: Error: Can't resolve 'C:\Users\sande\OneDrive\Desktop\project#1\client\my-app\node_modules\webpack-dev-server\client\index.js?protocol=ws%3A&hostname=0.0.0.0&port=3000&pathname=%2Fws&logging=none&reconnect=10' in 'C:\Users\sande\OneDrive\Desktop\project#1\client\my-app'
ERROR in Module not found: Error: Can't resolve 'C:\Users\sande\OneDrive\Desktop\project#1\client\my-app\node_modules\webpack-dev-server\client\index.js?protocol=ws%3A&hostname=0.0.0.0&port=3000&pathname=%2Fws&logging=none&reconnect=10' in 'C:\Users\sande\OneDrive\Desktop\project#1\client\my-app'

webpack compiled with 1 error

Upvotes: 1

Views: 1057

Answers (3)

sandeepvarma
sandeepvarma

Reputation: 9

Thanks for the help everyone, it resolved the error.

Upvotes: 0

yafeshan ünal
yafeshan ünal

Reputation: 137

There is a problem while reading the directory because there is a # character in your file path. Do not use # and similar signs in your directory path. Good work.

Upvotes: 1

Nikita
Nikita

Reputation: 1

I had the same error, I change my path and remove all # form it.

It should be like this #React/myProject/project#1 => React/myProject/project1

Upvotes: 0

Related Questions