
Description
Describe the bug
I started a fresh react application at my console by entering npx create-react-app my-app. Then, I changed my directory to my-app and ran the command npm start. When the application loaded in Chrome, it failed to compile...error given in console:
$ npm start
my-app@0.1.0 start
react-scripts start
i 「wds」: Project is running at http://10.0.0.215/
i 「wds」: webpack output is served from
i 「wds」: Content not from webpack is served from C:\Users\my-path\my-app\public
i 「wds」: 404s will fallback to /
Starting the development server...
Failed to compile.
./src/index.js 1:97
Module parse failed: Unexpected token (1:97)
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.
= require('C:/Users/my-path/my-app/node_modules/react-refresh/runtime.js');
|(module.id);
Did you try recovering your dependencies?
Yes.
Which terms did you search for in User Guide?
(Write your answer here if relevant.)
Environment
(paste the output of the command here.)
Steps to reproduce
(Write your steps here:)
- In a shell window, create a react app using command [npx create-react-app my-app]
- Change directory to my-app and enter command [npm start]
- Wait for browser to open and note that the browser is displaying an error as is the shell used to run the commands in steps 1 and 2
Expected behavior
(Write what you thought would happen.)
Actual behavior
(Write what happened. Please add screenshots!)
Reproducible demo
(Paste the link to an example project and exact instructions to reproduce the issue.)
Activity
brienna commentedon Jul 15, 2021
I have the same issue with a fresh install.
Lucaslah commentedon Sep 22, 2021
I'm getting the same error as well
stale commentedon Jan 9, 2022
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.