title: xcode using wrong node.js version
body: <p>I am new to React Native. I used <code>react-native init XXX</code> to create a new project. When launch the xcodeproj, I got an error saying:</p>
  
  <pre><code>  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] (/Users/allanhahaha/Documents/Seat/getseat/SeatApp/node_modules/react-native/node_modules/babel-core/lib/api/register/node.js:214: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.&lt;anonymous&gt; (/Users/allanhahaha/Documents/Seat/getseat/SeatApp/node_modules/react-native/cli.js:15:18)
      at Module._compile (module.js:456:26)
      at Object.Module._extensions..js (module.js:474:10)
  </code></pre>
  
  <p>According to my research, this is a node.js version issue: I should have use v.4.0+. </p>
  
  <p>I am using NVM to manage my node.js versions. In <strong>regular terminal window</strong>, I have this:</p>
  
  <pre><code>$ node --version
  v5.1.0
  </code></pre>
  
  <p>but in xcode when it run the start shell script, I saw it is using a different version, <code>v0.10.40</code>, and xcode doesn't know about <code>nvm</code> command either..</p>
  
  <p><strong>The question is, how should I configure my Mac so the xcode can pick up the same version that I set with nvm?</strong> </p>
  
  <p>Thank you!</p>
  
  <hr>
  
  <p><strong>Update</strong>: I tried to <code>source</code> my <code>~/.bash_profile</code> in the shell script executed by xcode, but still not solving the problem.</p>