【问题标题】:I'am creating a new reactjs application using " npx create-react-app" , and when it's done and trying to run it using "npm start" , I get an error我正在使用“npx create-react-app”创建一个新的 reactjs 应用程序,当它完成并尝试使用“npm start”运行它时,我收到一个错误
【发布时间】:2021-03-03 06:40:18
【问题描述】:

这是完整的错误信息

./src/index.js 1:58
Module parse failed: Unexpected token (1:58)
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/fcss/Desktop/Hussein's Projects/react-firebase-crud/node_modules/react-refresh/runtime.js');
| $RefreshSetup$(module.id);
|

【问题讨论】:

  • 尝试运行 npm install 以确保您的软件包已更新
  • 你使用的是什么版本的节点?

标签: javascript reactjs npm create-react-app


【解决方案1】:

发生这种情况是因为您在路径名称“Hussein's Projects”中使用了“'”,将其更改为“Husseins_Projects”,一切正常 你可以阅读更多关于它here

【讨论】:

    猜你喜欢
    • 2020-01-21
    • 1970-01-01
    • 2019-08-14
    • 2020-11-17
    • 2021-10-02
    • 1970-01-01
    • 1970-01-01
    • 2023-03-07
    • 1970-01-01
    相关资源
    最近更新 更多