0

I have nvm installed and node 6.1 installed via nvm. When I run the Awesome Project project on https://facebook.github.io/react-native/docs/getting-started.html i get the following error. If I uninstall nvm and node and reinstall via homebrew, it works. In the past, I get this to work by adding ES2015 to the project per the error. Anyone know why this is the case? I am assuming that this starter project is supposed to run without error. Thanks for any guidance. Here is the error:

Alains-MacBook-Pro-4:AwesomeProject klik$ npm start

> AwesomeProject@0.0.1 start /Users/klik/projects/AwesomeProject
> node node_modules/react-native/local-cli/cli.js start

/Users/klik/projects/AwesomeProject/node_modules/babel-core/lib/transformation/file/options/option-manager.js:413
          throw new Error( /*istanbul ignore next*/"Couldn't find preset " + /*istanbul ignore next*/(0, _stringify2.default)(val) + " relative to directory " + /*istanbul ignore next*/(0, _stringify2.default)(dirname));
          ^

Error: Couldn't find preset "es2015" relative to directory "/Users/klik/projects"
    at /Users/klik/projects/AwesomeProject/node_modules/babel-core/lib/transformation/file/options/option-manager.js:413:17
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/klik/projects/AwesomeProject/node_modules/babel-core/lib/transformation/file/options/option-manager.js:405:20)
    at OptionManager.mergePresets (/Users/klik/projects/AwesomeProject/node_modules/babel-core/lib/transformation/file/options/option-manager.js:388:10)
    at OptionManager.mergeOptions (/Users/klik/projects/AwesomeProject/node_modules/babel-core/lib/transformation/file/options/option-manager.js:347:14)
    at OptionManager.addConfig (/Users/klik/projects/AwesomeProject/node_modules/babel-core/lib/transformation/file/options/option-manager.js:248:10)
    at OptionManager.findConfigs (/Users/klik/projects/AwesomeProject/node_modules/babel-core/lib/transformation/file/options/option-manager.js:454:16)
    at OptionManager.init (/Users/klik/projects/AwesomeProject/node_modules/babel-core/lib/transformation/file/options/option-manager.js:502:12)
    at compile (/Users/klik/projects/AwesomeProject/node_modules/babel-register/lib/node.js:112:69)
    at loader (/Users/klik/projects/AwesomeProject/node_modules/babel-register/lib/node.js:158:14)

npm ERR! Darwin 15.5.0
npm ERR! argv "/Users/klik/.nvm/versions/node/v6.2.1/bin/node" "/Users/klik/.nvm/versions/node/v6.2.1/bin/npm" "start"
npm ERR! node v6.2.1
npm ERR! npm  v3.9.3
npm ERR! code ELIFECYCLE
npm ERR! AwesomeProject@0.0.1 start: `node node_modules/react-native/local-cli/cli.js start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the AwesomeProject@0.0.1 start script 'node node_modules/react-native/local-cli/cli.js start'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the AwesomeProject package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node node_modules/react-native/local-cli/cli.js start
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs AwesomeProject
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls AwesomeProject
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/klik/projects/AwesomeProject/npm-debug.log
armand
  • 693
  • 9
  • 29
  • did you make sure you're on the right version? try typing `node --version` – silicakes Jun 07 '16 at 16:15
  • My understanding is it should work with 6.1 which is my default right now.```Alains-MacBook-Pro-4:AwesomeProject klik$ node --version v6.2.1 Alains-MacBook-Pro-4:AwesomeProject klik$ which node /Users/klik/.nvm/versions/node/v6.2.1/bin/node Alains-MacBook-Pro-4:AwesomeProject klik$``` – armand Jun 07 '16 at 16:19
  • 6.1, you're on 6.*2*.1 – silicakes Jun 07 '16 at 16:43
  • I ran nvm install 6.1 then nvm use 6.1. verified 6.1 was the current node via which node and got the same error. ```npm ERR! Darwin 15.5.0 npm ERR! argv "/Users/klik/.nvm/versions/node/v6.1.0/bin/node" "/Users/klik/.nvm/versions/node/v6.1.0/bin/npm" "start" npm ERR! node v6.1.0 npm ERR! npm v3.8.6 npm ERR! code ELIFECYCLE npm ERR! AwesomeProject@0.0.1 start: `node node_modules/react-native/local-cli/cli.js start` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the AwesomeProject@0.0.1 start script 'node node_modules/react-native/local-cli/cli.js start'.``` – armand Jun 07 '16 at 16:54
  • can you edit your question and post the complete log, starting with the installation? – silicakes Jun 08 '16 at 05:56
  • @silicakes I did that over here. http://stackoverflow.com/questions/37367931/react-native-install-error-with-babel-es2015/37375194#37375194. Maybe you can take a look over there? Greatly appreciated. In that case, i got it to work but i would like to understand why i had to do all that. Seems like the starter project is just supposed to run. Thank you. – armand Jun 10 '16 at 16:32

0 Answers0