reactjs 无法在我的计算机中编译react项目

2ledvvac  于 2023-03-22  发布在  React
关注(0)|答案(1)|浏览(134)

新的react文件显示编译错误我只是做了一个react文件,并运行没有任何键入...它说:

Failed to compile.

Module not found: Error: Can't resolve 
'C:\Users\papai\OneDrive\Desktop\Web_Dev_Project\#30JS Project(React)\dram-
pad\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&l
ive-reload=true' in 'C:\Users\papai\OneDrive\Desktop\Web_Dev_Project\#30JS 
Project(React)\dram-pad'

ERROR in Module not found: Error: Can't resolve 
'C:\Users\papai\OneDrive\Desktop\Web_Dev_Project\#30JS Project(React)\dram-
pad\node_modules\webpack-dev-server\client\index.js?
protocol=ws%3A&hostname=0.0.0.0&port=3000&pathname=%2Fws&logging=none&overla
y=%7B%22errors%22%3Atrue%2C%22warnings%22%3Afalse%7D&reconnect=10&hot=true&l
ive-reload=true' in 'C:\Users\papai\OneDrive\Desktop\Web_Dev_Project\#30JS 
Project(React)\dram-pad'

webpack compiled with 1 error

请修复此错误

mwngjboj

mwngjboj1#

问题似乎是您正在将项目保存到OneDrive位置。访问云存储时很可能出现问题。
我建议在本地目录中创建一个新项目,例如'C:\Users\username\Documents'

相关问题