user2950593
user2950593

Reputation: 9647

react-native run-android command fails

On ubuntu 14.04 I try to launch hello world project. I get the following output when print react-native run-android

/home/jonstark/AwesomeProject/node_modules/react-native/local-cli/cli.js:73 const setupEnvScript = /^win/.test(process.platform) ^^^^^ SyntaxError: Use of const in strict mode. at Module._compile (module.js:439:25) at Module._extensions..js (module.js:474:10) at Object.require.extensions.(anonymous function) [as .js] (/home/jonstark/AwesomeProject/node_modules/babel-register/lib/node.js:138:7) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/home/jonstark/AwesomeProject/node_modules/react-native/cli.js:15:18) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10)

What do I do to get it working?

I tried to update nodejs with sudo npm install -g n Then node -v shows

v0.10.25

Upvotes: 0

Views: 222

Answers (1)

David Anderson
David Anderson

Reputation: 8616

Your node version is horribly outdated. See here for steps on how to update it on Ubuntu: https://askubuntu.com/questions/426750/how-can-i-update-my-nodejs-to-the-latest-version

Upvotes: 2

Related Questions