简体   繁体   English

安装 npm 和 npm 启动后开源 React App 编译失败

[英]Open Source React App Failed to Compile after npm install and npm start

I am getting this error on my window 10 when I try to run this app.当我尝试运行此应用程序时,我的 window 10 上出现此错误。 This app is on github as open source project.这个应用程序作为开源项目在 github 上。 I was trying to contribute to this project but seems like its not compiling.我试图为这个项目做出贡献,但似乎它没有编译。 I already have tried changing react-scripts to 4.0.1 but still the problem remains.我已经尝试将react-scripts更改为4.0.1 ,但问题仍然存在。 On changing the react-scripts version it is giving me more module not found related errors on npm install.在更改 react-scripts 版本时,它给了我更多在 npm 安装上未找到相关错误的模块。

Please help!请帮忙!

Link to project repo 链接到项目回购

./src/index.js 1:43
Module parse failed: Unexpected token (1:43)
File was processed with these loaders:
 * ./node_modules/@pmmmwh/react-refresh-webpack-plugin/loader/index.js
 * ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
> $RefreshRuntime$ = require('C:/Users/Singh's/Desktop/Opportunity-Calendar-Frontend/Opportunity-Calendar-Frontend/node_modules/react-refresh/runtime.js');
| $RefreshSetup$(module.id);
|

try this:尝试这个:

rm node_module -r
npm cache verify       
npm cache clean --force
npm install

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM