react-native icon indicating copy to clipboard operation
react-native copied to clipboard

While running command like "react-native init AwesomeProject" am getting following error please tell me how to solve it ?

Open prashanthmerugucs opened this issue 11 years ago • 17 comments

Installing react-native package from npm... /Users/vasavi/dev/CLOUDSEED_APP/AwesomeProject/node_modules/react-native/local-cli/init.js:7 class CreateSuppressingTerminalAdapter extends TerminalAdapter { ^^^^^ SyntaxError: Unexpected reserved word at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) at Object. (/Users/vasavi/dev/CLOUDSEED_APP/AwesomeProject/node_modules/react-native/local-cli/cli.js:11:12) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10)

prashanthmerugucs avatar Oct 16 '15 05:10 prashanthmerugucs

+1, I encountered the same issue.

eLBirador avatar Oct 16 '15 05:10 eLBirador

Make sure you have Node 4+ as explained in the setup instructions.

ide avatar Oct 16 '15 06:10 ide

Have the same issue I tried 4.0.0 and 4.2.1 also but the issue still existed

When i ran yeoman 'yo doctor' it showed me v1.0 . Then i checked 'node-v' version 4 existed in nvm environment but not in the global (system wide).

To resolve install 4+ on nvm and also system wide by running the following commands

sudo npm cache clean -f sudo npm install -g n sudo n stable sudo ln -sf /usr/local/n/versions/node//bin/node /usr/bin/node

harshasoftware avatar Oct 16 '15 08:10 harshasoftware

Thanks for the followup @sriharrsha!

brentvatne avatar Oct 18 '15 19:10 brentvatne

Thanks

AlbanMinassian avatar Oct 24 '15 14:10 AlbanMinassian

Thanks

jickyi521 avatar Oct 26 '15 01:10 jickyi521

@sriharrsha Thanks a lot man !

g3r4 avatar Oct 26 '15 18:10 g3r4

@sriharrsha You saved my day !

gabriellupu avatar Nov 06 '15 16:11 gabriellupu

ln: /usr/bin/node: Operation not permitted

d668 avatar Nov 29 '15 01:11 d668

Same problem while running Node 5.2 Is there a new fix?

chalupien avatar Dec 10 '15 16:12 chalupien

@sriharrsha saved my life. I have been trying to fix this error since a week. Glad that I got to see your post. Thanks mate.

srinivasdamam avatar Mar 10 '16 17:03 srinivasdamam

Run nvm install node && nvm alias default node

petervavro avatar Apr 14 '16 20:04 petervavro

@petervavro for menvm didn't work, tried all the workarounds for it and finally used n package manager and it worked.

srinivasdamam avatar Apr 15 '16 04:04 srinivasdamam

+1, I encountered the same issue.

alayo avatar Apr 18 '16 00:04 alayo

thanks

ssmlee04 avatar Jun 05 '16 05:06 ssmlee04

thanks it Worked 👍

imano-geek avatar Jun 20 '16 11:06 imano-geek

use node version 4.4.4

ghost avatar Jul 01 '16 05:07 ghost