Is this a bug report?
Yes.
Yes.
Environment
react-native -v: react-native-cli: 2.0.1, react-native: 0.48.2
node -v: v8.4.0
npm -v: 5.3.0
yarn --version: 1.0.1
Then, specify:
- Development Operating System: macOS Sierra - 10.12.6 (16G29)
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 by nvm 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 via brew.)
See react-native-xcode.sh.
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?
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.1Then, specify:
Steps to Reproduce
(Write your steps here:)
nvminstalled that I'd never removed from my system and it was using Node v4.react-native-xcode.shran, it used the version of node.js provided bynvmwhich 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:
nodeor newer is required to support React Native.nvmis used by the system if it is available. (Either directly installed or viabrew.)See react-native-xcode.sh.
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
nvmand 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.shfile doesn't log out anything about the node version being used -- is that something that would make sense to add?