I ran into the PATH problem by creating a new React Native iOS project in Xcode 7.1. I'm trying to use ndenvnode for version control, which means it ~/.ndenv/shimsshould be on PATH. To this end, I set PATH as a user project in quality $PATH:~/.ndenv/shims. The Xcode settings user interface shows the correct extended PATH value.
However, the project created react-native initstill cannot be built. Custom build script does not find react-native:
../node_modules/react-native/packager/react-native-xcode.sh: line 36: react-native: command not found
react-nativeinstalled correctly, but the dump of environment variables in the output of the assembly makes it clear that ~/.ndenv/shimsit is not in the PATH. My PATH settings are not displayed in the build environment. However, if I set an arbitrary user parameter (for example, FOOBAR=baz) that displays correctly in the build environment.
This result plus further PATH validation in the build environment makes it clear that Xcode overrides PATH somewhere along the line.
So, in order of preference:
- How to append script to custom build script in Xcode 7?
- Alternatively, what's the best (least hacky?) Way to get npmv npm modules for PATH to build a script for?
Modifying the reaction -native -xcode.sh is out of the question since this is part of the external reactive npm module.
UPDATE 1
, ndenv node homebrew. react-native (-, ) Xcode /usr/local/bin , . , node, ndenv.