When I run react-native init application-name
, no XCode project gets generated.
The node_modules
dir and package.json
file is generated and npm install
is run, but immediately after the 'npm dependency graph' is printed, it stops.
The last line of output is rbenv: no such command
exec'`, which seems rather strange as this has nothing to do with rbenv/Ruby.
Full log output:
👉 react-native init ReactiveNews
This will walk you through creating a new React Native project in /Users/taylor/Git/ReactiveNews
npm WARN engine makeerror@1.0.10: wanted: {"node":"0.6.x"} (current: {"node":"0.10.38","npm":"1.4.28"})
> ws@0.4.31 install /Users/taylor/Git/ReactiveNews/node_modules/react-native/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/bufferutil.node
SOLINK_MODULE(target) Release/bufferutil.node: Finished
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/validation.node
SOLINK_MODULE(target) Release/validation.node: Finished
npm WARN engine tmpl@1.0.3: wanted: {"node":"0.6.x"} (current: {"node":"0.10.38","npm":"1.4.28"})
react-native@0.2.1 node_modules/react-native
├── absolute-path@0.0.0
├── stacktrace-parser@0.1.1
├── react-timer-mixin@0.13.1
├── underscore@1.7.0
├── q@1.0.1
├── yargs@1.3.2
├── debug@2.1.3 (ms@0.7.0)
├── source-map@0.1.31 (amdefine@0.1.0)
├── optimist@0.6.1 (wordwrap@0.0.2, minimist@0.0.10)
├── worker-farm@1.1.0 (xtend@4.0.0, errno@0.1.2)
├── rebound@0.0.12
├── sane@1.0.1 (watch@0.10.0, fb-watchman@0.0.0, minimatch@0.2.14, walker@1.0.6)
├── uglify-js@2.4.17 (uglify-to-browserify@1.0.2, async@0.2.10, yargs@1.3.3, source-map@0.1.34)
├── jstransform@10.0.1 (base62@0.1.1, esprima-fb@13001.1.0-dev-harmony-fb)
├── joi@5.1.0 (topo@1.0.2, isemail@1.1.1, hoek@2.12.0, moment@2.9.0)
├── connect@2.8.3 (uid2@0.0.2, methods@0.0.1, fresh@0.1.0, pause@0.0.1, cookie-signature@1.0.1, buffer-crc32@0.2.1, qs@0.6.5, bytes@0.2.0, cookie@0.1.0, formidable@1.0.14, send@0.1.2)
├── module-deps@3.5.6 (inherits@2.0.1, shallow-copy@0.0.1, minimist@0.2.0, subarg@0.0.1, stream-combiner2@1.0.2, parents@1.0.1, readable-stream@1.0.33, resolve@0.7.4, through2@0.4.2, duplexer2@0.0.2, concat-stream@1.4.7, browser-resolve@1.8.1, JSONStream@0.7.4, detective@3.1.0)
├── react-tools@0.13.0-rc2 (commoner@0.10.1)
└── ws@0.4.31 (tinycolor@0.0.1, options@0.0.6, commander@0.6.1, nan@0.3.2)
rbenv: no such command `exec'
The issue was with the init.sh script under node_modules/react-native, rbenv threw the rbenv: no such command `exec'
every time it was executed. I first solved it by running it directly through rbenv with rbenv exec
but was able to solve the issue entirely by turning the rbenv bundler plugin off and on again.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.