question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Creating new project fails

See original GitHub issue

Description

I did a fresh install following the instructions on https://facebook.github.io/react-native/docs/getting-started.html#content, but it fails at the first step:

react-native init AwesomeProject

This results in this output (the packages are installed properly with yarn):

├─ yargs-parser@4.2.1
└─ yargs@6.6.0
✨  Done in 5.86s.
/private/tmp/test/AwesomeProject/node_modules/babel-core/lib/transformation/file/index.js:600
      throw err;
      ^

SyntaxError: /private/tmp/test/AwesomeProject/node_modules/react-native/packager/react-packager/src/node-haste/index.js: You can only use Class Properties when the 'classProperties' plugin is enabled. (389:2)
  387 |   }
  388 |
> 389 |   static Cache;
      |   ^
  390 |   static Module;
  391 |   static Polyfill;
  392 |   static getAssetDataFromName;
    at Parser.pp$5.raise (/private/tmp/test/AwesomeProject/node_modules/babylon/lib/index.js:4380:13)
    at Parser.pp$1.parseClassProperty (/private/tmp/test/AwesomeProject/node_modules/babylon/lib/index.js:2508:10)
    at Parser.parseClassProperty (/private/tmp/test/AwesomeProject/node_modules/babylon/lib/index.js:5947:20)
    at Parser.pp$1.parseClassBody (/private/tmp/test/AwesomeProject/node_modules/babylon/lib/index.js:2424:34)
    at Parser.pp$1.parseClass (/private/tmp/test/AwesomeProject/node_modules/babylon/lib/index.js:2361:8)
    at Parser.pp$1.parseStatement (/private/tmp/test/AwesomeProject/node_modules/babylon/lib/index.js:1798:19)
    at Parser.parseStatement (/private/tmp/test/AwesomeProject/node_modules/babylon/lib/index.js:5719:22)
    at Parser.pp$1.parseBlockBody (/private/tmp/test/AwesomeProject/node_modules/babylon/lib/index.js:2223:21)
    at Parser.pp$1.parseTopLevel (/private/tmp/test/AwesomeProject/node_modules/babylon/lib/index.js:1733:8)
    at Parser.parse (/private/tmp/test/AwesomeProject/node_modules/babylon/lib/index.js:1628:17)

Additional Information

I first thought it was a node problem so I reverted from 7.6.0 to the 6.10.0 LTS version, same result.

  • React Native version: ->
react-native-cli: 2.0.1
react-native: n/a - not inside a React Native project directory
  • Platform: both
  • Operating System: MacOS

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:30
  • Comments:54 (9 by maintainers)

github_iconTop GitHub Comments

29reactions
kumarpatelcommented, Feb 23, 2017

npm uninstall babylon && npm install babylon@6.15.0

26reactions
MoOxcommented, Feb 23, 2017

Stop +1 noise. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting an error while creating a new project in VS2019
The error says (Attached the screenshot of the error dialog) “Failed to open the new experience to create projects. Falling back to the...
Read more >
How To Fix Unity Creating Project Folder Failed Error - YouTube
0:00 · New ! Watch ads now so you can enjoy fewer interruptions. Got it ...
Read more >
Unable to create or save a new project in Fusion 360
Issue: When trying to create a project in Fusion 360, the operation fails and one of the following behaviors is observed:.
Read more >
Creating Project Folder Failed (Cannot load projects)
I am a new user working with a fresh install of Unity on Windows 10. I've completed a basic microgame tutorial, closed it,...
Read more >
When creating a new project fails, the project is still created
When creating a project with invalid values the CLI says that it failed, but trying again to create the project results in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found