Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug / Docs] Usage of nvm is undocumented #15883

Closed
calvinf opened this issue Sep 10, 2017 · 2 comments
Closed

[Bug / Docs] Usage of nvm is undocumented #15883

calvinf opened this issue Sep 10, 2017 · 2 comments
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@calvinf
Copy link

calvinf commented Sep 10, 2017

Is this a bug report?

Yes.

Have you read the Contributing Guidelines?

Yes.

Environment

  1. react-native -v: react-native-cli: 2.0.1, react-native: 0.48.2
  2. node -v: v8.4.0
  3. npm -v: 5.3.0
  4. yarn --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:)

  1. I forgot I had an old version of nvm installed that I'd never removed from my system and it was using Node v4.
  2. 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:

  1. A certain version of node or newer is required to support React Native.
  2. 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?

@hramos
Copy link
Contributor

hramos commented Sep 11, 2017

Node 4 is supported, but there's a known issue with how the eslint deps are pulled in that results in an error when npm2 is used (which is the version of npm Node 4 comes with). If we fix that, then the issue you're reporting should go away.

See #15821 for discussion.

@stale
Copy link

stale bot commented Nov 10, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Nov 10, 2017
@stale stale bot closed this as completed Nov 17, 2017
@facebook facebook locked and limited conversation to collaborators May 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

2 participants