Skip to content
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

Unable to start new app #1550

Closed
Conrad2134 opened this issue Feb 14, 2017 · 11 comments
Closed

Unable to start new app #1550

Conrad2134 opened this issue Feb 14, 2017 · 11 comments

Comments

@Conrad2134
Copy link

Conrad2134 commented Feb 14, 2017

Note from Maintainers

Newly created applications experienced a brief disruption between 8:15 PM - 9:15 PM (EST). The issue is now resolved.

Please delete the node_modules directory and then run npm install.
If using yarn, you only need to run yarn upgrade.


Can you reproduce the problem with latest npm?

Yes

Description

I created a new app with create-react-app and I'm not able to run it. I can create a production build just fine and run that, but the development build doesn't work.

Actual behavior

Here is the error I'm receiving in the terminal / browser:

Failed to compile.

Error in ./src/index.js
Module build failed: TypeError: /home/connor/git/Wakonda/src/index.js: Cannot read property 'scope' of undefined
 @ multi main

And here's what I see when I open the console:

Uncaught Error: Cannot find module "/home/connor/git/cra-bug/src/index.js"
    at webpackMissingModule (bootstrap 2a26695…:578)
    at Object.<anonymous> (bootstrap 2a26695…:578)
    at __webpack_require__ (bootstrap 2a26695…:555)
    at bootstrap 2a26695…:578
    at bootstrap 2a26695…:578

Environment

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (if you haven’t ejected):
    └── [email protected]
  2. node -v:
    v7.5.0
  3. npm -v:
    4.1.2

If it makes any difference, I was using Yarn, but I also tested installing dependencies via npm and got the same issue.

Edit: I also tried this in Windows 10, and I receive the same error.

Then, specify:

  1. Operating system: Elementary OS (Linux)
  2. Browser and version: Chrome 56

Reproducible Demo

https://github.com/Conrad2134/cra-bug

@ColinRTaylor
Copy link

ColinRTaylor commented Feb 14, 2017

I'm getting the same error.

Environment:
node v7.2.1
OSX El Capitan 10.11.5

I think it has to do with the version of babel-core used.

I fixed it by:

  1. Ejecting
  2. Upgrading babel-core to 6.23.0

@thevarunraja
Copy link

I'm getting the same error

Environment:
node -v
v7.4.0

npm -v
4.2.0

Operating System: macOS Sierra v10.12.3

@ajeremiaspb
Copy link

I had the same error too.
Just update babel in your project using this command:

npm install --save-dev babel-core

References:

ModuleBuildError: Module build failed: TypeError: Cannot read property 'scope' of undefined
Fix bug - undefined reference for export declaration

@Conrad2134
Copy link
Author

@ajeremias - that did work for me, thanks for the tip! 👍

If anyone needs a temporary solution - that's it.

@davidfekke
Copy link

This is broken for me as well.

Error in ./src/index.js
Module build failed: TypeError: /Users/********/Documents/node/projects/hello-world/src/index.js: Cannot read property 'scope' of undefined
@ multi main

@genma123
Copy link

@ajeremias - that worked for me, too! Didn't need to eject.

@existentialism
Copy link
Contributor

We inadvertently released a backwards incompatible change in babel-traverse.

We just reverted it and released a fix (6.23.1) that should fix this issue. Please reinstall deps. Sorry for the inconvenience!

@glazzari
Copy link

It could be related to babel/babel#5305.

@Timer
Copy link
Contributor

Timer commented Feb 14, 2017

Sorry for the trouble everyone! Perhaps now is the time to reignite our Yarn discussions.

@Timer Timer closed this as completed Feb 14, 2017
@Conrad2134
Copy link
Author

Thanks for looking into it!

@Timer
Copy link
Contributor

Timer commented Feb 14, 2017

I've opened an issue about this here so we can try to prevent this from happening in the future: #1551

@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants