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.

react-app new fails after install

See original GitHub issue

I just installed this and tried it out and it fails automatically. What version of node can I use?

$ npm install -g react-app
/usr/local/bin/react-app -> /usr/local/lib/node_modules/react-app/bin/react-app.js
/usr/local/lib
`-- react-app@1.1.1

$ mkdir test-react-app 
$ cd test-react-app 
$ react-app new    
/usr/local/lib/node_modules/react-app/bin/react-app.js:6
const { execSync, spawn } = require('child_process');
      ^

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:387:25)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:141:18)
    at node.js:933:3
~/git/test-react-app

$ node --version
v5.7.1


Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
bradparkscommented, Jul 28, 2016

cool… i’ll give that a shot… and if possible, I’d think it’d be a good idea to have your it check the node version and fail with a nice message there if the node version was too old… thanks!

1reaction
koistyacommented, Aug 1, 2016

Now it should print the following message to the console, if you attempt to use this tool with Node < 6:

ERROR: This tool requires Node.js v6 or higher.

react-app v1.1.2 react-app-tools v1.1.2

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create React App not installing, showing an error and ...
I just re-downloaded the installer from the Node.js website. This should reinstall all the dependencies and make sure that all paths are valid....
Read more >
NPX Create React APP Not Working - YouTube
To create a new React App, we use npx command with create- react - app and ... It should create a new react...
Read more >
npx create-react-app not working? Here's the solution.
The current solution is simple — run create-react-app and target the latest version. Run creact-react-app using the latest version. npx create- ...
Read more >
npx create-react-app is not working · Issue #10132 - GitHub
I am able to solve the problem by first trying to uninstall the npm globally, update the npm, clear the cache then using...
Read more >
create-react-app: command not found (React) error [Solved]
Use npx to solve the error "create-react-app: command not found", e.g. npx create-react-app my-app or install the package globally by running npm install...
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