-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Description
Is this a bug report?
Yes.
Have you read the Contributing Guidelines?
Yes.
Environment
react-native -v
: react-native-cli: 2.0.1, react-native: 0.48.2node -v
: v8.4.0npm -v
: 5.3.0yarn --version
: 1.0.1
Then, specify:
- Target Platform: iOS
- Development Operating System: macOS Sierra - 10.12.6 (16G29)
- Build tools: XCode
Steps to Reproduce
(Write your steps here:)
- I forgot I had an old version of
nvm
installed that I'd never removed from my system and it was using Node v4. - When
react-native-xcode.sh
ran, it used the version of node.js provided bynvm
which is different from the default version of node.js on my system that I use for the rest of my development.
Expected Behavior
I expected to be told on the command line or in documentation that:
- A certain version of
node
or newer is required to support React Native. - That
nvm
is used by the system if it is available. (Either directly installed or viabrew
.)
Actual Behavior
My bundle failed due to using an old version of node via nvm without me knowing. None of the debugging instructions say anything about nvm being used.
I fixed the problem by uninstalling nvm on my system since I haven't been using it in development anymore.
Reproducible Demo
This should be reproducible by installing nvm
and Node 4.x.
I'm not sure of a good way to share a reproducible demo since this is more of an environment configuration issue. I'd expect to occur with the React Native demo app, too.
Next steps
I'm interested in working on a "fix" for this issue by adding some documentation, but I could use some guidance on the best approach. Where in the docs does it make sense to add info about nvm
?
The react-native-xcode.sh
file doesn't log out anything about the node version being used -- is that something that would make sense to add?