-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React npm start failing on out of the box code. #10614
Comments
Experienced the same issue; tried reinstalling Solution 1: Solution 2:
If these workarounds didn't fix this, you might want to check the workarounds suggested in #10601. |
Experiencing the exact same issue. System: global create-react-app has been uninstalled. Just trying to get the initial create-react-app to start - no modifications made. No matter what I do I get this error every time:
|
Reverting |
Going back from 4.03 to 4.01 in scripts worked. Thank you @iastanley |
Describe the bug
(Write your answer here.)
create-react-app app name builds the app. However. However, npm start fails out of the box. By this, I mean I haven't touched any of the codebase. I've been using Vs code. I have tried uninstalling and reinstalling node_modules, creating completely new react apps, and using different browsers. I tried updating my nodejs and my npm, and have tried npm install.
I always get the following error. Note, There aren't 43 columns in line one of index.Js, so i'm not even sure what its referring to.
Failed to compile.
./src/index.js 1:43
Module parse failed: Unexpected token (1:43)
File was processed with these loaders:
You may need an additional loader to handle the result of these loaders.
Did you try recovering your dependencies?
yes, multiple times.
(Write your answer here.)
npm 7.5.6 I have followed all of the steps.
Which terms did you search for in User Guide?
(Write your answer here if relevant.)
pasted the error. Also tried "react fails to compile on innitial load" and "react module parse error on initial load"
Environment
Environment Info:
current version of create-react-app: 4.0.3
running from C:\Users\Ethan's PC\AppData\Roaming\npm\node_modules\create-react-app
System:
OS: Windows 10 10.0.19042
CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
Binaries:
Node: 14.15.5 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 7.5.6 - ~\AppData\Roaming\npm\npm.CMD
Browsers:
Chrome: 85.0.4183.102
Edge: Spartan (44.19041.423.0), Chromium (88.0.705.74)
Internet Explorer: 11.0.19041.1
npmPackages:
react: ^17.0.1 => 17.0.1
react-dom: ^17.0.1 => 17.0.1
react-scripts: 4.0.3 => 4.0.3
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
(Write your steps here:)
Expected behavior
It should have opened React in a browser.Actual behavior
A browser DOES open, but it is just a blank page with a copy of the error.
Reproducible demo
I would but there is nothing to send. It's a basic level issue. As a student in school for programming, I'm having to build all of my
React projects in codeSandbox and it's been challenging. Please let me know if you have any insight!
The text was updated successfully, but these errors were encountered: