【问题标题】:Open Source React App Failed to Compile after npm install and npm start开源 React App 在 npm install 和 npm start 后编译失败
【发布时间】:2021-04-21 10:48:34
【问题描述】:

当我尝试运行此应用程序时,我的窗口 10 上出现此错误。这个应用程序作为开源项目在 github 上。我试图为这个项目做出贡献,但似乎它没有编译。我已经尝试将react-scripts 更改为4.0.1,但问题仍然存在。在更改 react-scripts 版本时,它给了我更多在 npm install 上未找到相关错误的模块。

请帮忙!

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);
|

【问题讨论】:

    标签: javascript node.js reactjs npm webpack


    【解决方案1】:

    试试这个:

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

    【讨论】:

    • 我收到此错误 npm cache clean --force "npm WARN using --force Recommended protections disabled."我该如何解决这个问题?
    猜你喜欢
    • 1970-01-01
    • 2021-12-22
    • 2019-05-26
    • 2018-11-30
    • 1970-01-01
    • 1970-01-01
    • 2017-06-11
    • 2021-08-01
    • 1970-01-01
    相关资源
    最近更新 更多