简体   繁体   English

React Native初始化不会创建Xcode项目

[英]React Native init does not create Xcode project

When I run react-native init application-name , no XCode project gets generated. 当我运行react-native init application-name ,不会生成任何XCode项目。

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. 生成了node_modules dir和package.json文件,并npm install ,但是在打印“ npm依赖关系图”之后,它立即停止了。

The last line of output is rbenv: no such command exec'`, which seems rather strange as this has nothing to do with rbenv/Ruby. 输出的最后一行是rbenv: no such command exec'`,这似乎很奇怪,因为它与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. 问题出在node_modules / react-native下的init.sh脚本,rbenv抛出了rbenv: no such command `exec'每次执行时都rbenv: no such command `exec' 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. 我首先通过使用rbenv exec通过rbenv直接运行它来解决了该问题,但能够通过重新打开rbenv bundler插件完全解决该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM