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

react-native-cli init leads to corrupt project #2593

Closed
mschipperheyn opened this issue Sep 7, 2015 · 10 comments

Comments

Projects
None yet
6 participants
@mschipperheyn
Copy link

commented Sep 7, 2015

Made sure I upgraded react-native-cli to latest version and created a new project.

First of all, myproject.xodeproj is installed to the IOS directory, not as indicated by the cli in the root directory of the project.

When I open in xcode and try to run, I get a parse error in RCTNetworking.m at line 223: expected a type and in RCTBridgeModule.h at lines 140: Expanded from macro RCT_EXPORT_METHOD and 152: Expanded from macro RCT_REMAP_METHOD.

Second time I try to run the project, I also get parse errors in RCTWebSocketManager.m

I use Xcode on Mac OS Maverick. Perhaps this has something to do w it?

@ide

This comment has been minimized.

Copy link
Collaborator

commented Sep 7, 2015

What version of Xcode are you using? Try 6.3+. Also almost all the people working on RN are using the latest or second-latest OS and compilers so you may have an easier time if you keep your own setup up-to-date.

@mschipperheyn

This comment has been minimized.

Copy link
Author

commented Sep 7, 2015

I use Xcode 6.2. I can't upgrade to 6.3 on Maverick. But i get these errors during install:

bufferutil@1.1.0 install /Users/Shared/java/projects/react/msa/msa_mobile/node_modules/react-native/node_modules/ws/node_modules/bufferutil
node-gyp rebuild

gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: connect ETIMEDOUT 104.20.22.46:80
gyp ERR! stack at Object.exports._errnoException (util.js:749:11)
gyp ERR! stack at exports._exceptionWithHostPort (util.js:772:20)
gyp ERR! stack at TCPConnectWrap.afterConnect as oncomplete
gyp ERR! System Darwin 13.4.0
gyp ERR! command "/usr/local/Cellar/iojs/1.8.1/bin/iojs" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Shared/java/projects/react/msa/msa_mobile/node_modules/react-native/node_modules/ws/node_modules/bufferutil
gyp ERR! node -v v1.8.1
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok

utf-8-validate@1.1.0 install /Users/Shared/java/projects/react/msa/msa_mobile/node_modules/react-native/node_modules/ws/node_modules/utf-8-validate
node-gyp rebuild

gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 404 status code downloading tarball
gyp ERR! stack at Request. (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:246:14)
gyp ERR! stack at emitOne (events.js:82:20)
gyp ERR! stack at Request.emit (events.js:166:7)
gyp ERR! stack at Request.onRequestResponse (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1139:10)
gyp ERR! stack at emitOne (events.js:77:13)
gyp ERR! stack at ClientRequest.emit (events.js:166:7)
gyp ERR! stack at HTTPParser.parserOnIncomingClient (_http_client.js:412:21)
gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)
gyp ERR! stack at Socket.socketOnData (_http_client.js:302:20)
gyp ERR! stack at emitOne (events.js:77:13)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "/usr/local/Cellar/iojs/1.8.1/bin/iojs" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Shared/java/projects/react/msa/msa_mobile/node_modules/react-native/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v1.8.1
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm WARN optional dep failed, continuing bufferutil@1.1.0
npm WARN optional dep failed, continuing utf-8-validate@1.1.0

fsevents@0.3.8 install /Users/Shared/java/projects/react/msa/msa_mobile/node_modules/react-native/node_modules/babel/node_modules/chokidar/node_modules/fsevents
node-gyp rebuild

gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: connect ETIMEDOUT 104.20.22.46:80
gyp ERR! stack at Object.exports._errnoException (util.js:749:11)
gyp ERR! stack at exports._exceptionWithHostPort (util.js:772:20)
gyp ERR! stack at TCPConnectWrap.afterConnect as oncomplete
gyp ERR! System Darwin 13.4.0
gyp ERR! command "/usr/local/Cellar/iojs/1.8.1/bin/iojs" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Shared/java/projects/react/msa/msa_mobile/node_modules/react-native/node_modules/babel/node_modules/chokidar/node_modules/fsevents
gyp ERR! node -v v1.8.1
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm WARN optional dep failed, continuing fsevents@0.3.8
react-native@0.10.1 node_modules/react-native
├── absolute-path@0.0.0
├── stacktrace-parser@0.1.2
├── graceful-fs@3.0.6
├── react-timer-mixin@0.13.2
├── wordwrap@1.0.0
├── underscore@1.7.0
├── image-size@0.3.5
├── semver@4.3.6
├── yargs@1.3.2
├── debug@2.1.0 (ms@0.6.2)
├── immutable@3.7.5
├── optimist@0.6.1 (wordwrap@0.0.3, minimist@0.0.10)
├── source-map@0.1.31 (amdefine@1.0.0)
├── chalk@1.0.0 (escape-string-regexp@1.0.3, ansi-styles@2.1.0, supports-color@1.3.1, strip-ansi@2.0.1, has-ansi@1.0.3)
├── promise@7.0.4 (asap@2.0.3)
├── worker-farm@1.3.1 (xtend@4.0.0, errno@0.1.4)
├── rebound@0.0.12
├── sane@1.2.0 (watch@0.10.0, minimist@1.2.0, exec-sh@0.2.0, walker@1.0.7, fb-watchman@1.6.0, minimatch@0.2.14)
├── connect@2.8.3 (methods@0.0.1, uid2@0.0.2, fresh@0.1.0, cookie-signature@1.0.1, pause@0.0.1, qs@0.6.5, bytes@0.2.0, buffer-crc32@0.2.1, cookie@0.1.0, formidable@1.0.14, send@0.1.2)
├── uglify-js@2.4.16 (uglify-to-browserify@1.0.2, async@0.2.10, optimist@0.3.7, source-map@0.1.34)
├── joi@5.1.0 (topo@1.0.3, isemail@1.1.1, hoek@2.14.0, moment@2.10.6)
├── ws@0.7.2 (options@0.0.6, ultron@1.0.2)
├── module-deps@3.5.6 (inherits@2.0.1, shallow-copy@0.0.1, duplexer2@0.0.2, minimist@0.2.0, subarg@0.0.1, parents@1.0.1, concat-stream@1.4.10, resolve@0.7.4, readable-stream@1.1.13, through2@0.4.2, stream-combiner2@1.0.2, browser-resolve@1.9.1, JSONStream@0.7.4, detective@3.1.0)
├── regenerator@0.8.36 (private@0.1.6, through@2.3.8, recast@0.10.25, esprima-fb@15001.1.0-dev-harmony-fb, defs@1.1.0, commoner@0.10.3)
├── jstransform@11.0.1 (object-assign@2.1.1, base62@1.1.0, source-map@0.4.4, esprima-fb@15001.1.0-dev-harmony-fb, commoner@0.10.3)
├── react-tools@0.14.0-beta1 (commoner@0.10.3)
├── babel-core@5.8.21 (slash@1.0.0, try-resolve@1.0.1, babel-plugin-remove-console@1.0.1, babel-plugin-remove-debugger@1.0.1, babel-plugin-eval@1.0.1, babel-plugin-jscript@1.0.4, babel-plugin-property-literals@1.0.1, babel-plugin-inline-environment-variables@1.0.1, babel-plugin-react-constant-elements@1.0.3, babel-plugin-member-expression-literals@1.0.1, babel-plugin-undefined-to-void@1.1.6, to-fast-properties@1.0.1, trim-right@1.0.1, path-is-absolute@1.0.0, path-exists@1.0.0, babel-plugin-react-display-name@1.0.3, shebang-regex@1.0.0, babel-plugin-constant-folding@1.0.1, fs-readdir-recursive@0.1.2, babel-plugin-proto-to-assign@1.0.4, babel-plugin-dead-code-elimination@1.0.2, babel-plugin-runtime@1.0.7, private@0.1.6, globals@6.4.1, esutils@2.0.2, convert-source-map@1.1.1, js-tokens@1.0.1, babylon@5.8.23, resolve@1.1.6, bluebird@2.9.34, json5@0.4.0, line-numbers@0.2.0, home-or-tmp@1.0.0, babel-plugin-undeclared-variables-check@1.0.2, debug@2.2.0, detect-indent@3.0.1, output-file-sync@1.1.1, lodash@3.10.1, core-js@1.1.4, source-map@0.4.4, source-map-support@0.2.10, minimatch@2.0.10, is-integer@1.0.6, repeating@1.1.3, regenerator@0.8.35, regexpu@1.2.0)
└── babel@5.8.21 (slash@1.0.0, path-exists@1.0.0, path-is-absolute@1.0.0, fs-readdir-recursive@0.1.2, convert-source-map@1.1.1, commander@2.8.1, output-file-sync@1.1.1, source-map@0.4.4, lodash@3.10.1, glob@5.0.14, chokidar@1.0.5)
Setting up new React Native app in /Users/Shared/java/projects/react/msa/msa_mobile
Next Steps:
Open iOS//Users/Shared/java/projects/react/msa/msa_mobile/msa_mobile.xcodeproj in Xcode
Hit Run button

@ide

This comment has been minimized.

Copy link
Collaborator

commented Sep 7, 2015

RN only supports Xcode 6.3+. It may work with 6.2 but there's no support for it per se, especially with Xcode 7 coming very soon.

For the io.js issue try getting nvm and install io.js 2.x with nvm install v2. All sorts of weird things can happen if you install node/iojs with brew or the pkg.

@mschipperheyn

This comment has been minimized.

Copy link
Author

commented Sep 8, 2015

Thx, I guess I will have to patient for El Capitan. Held back from installing Yosemite with all these WiFi issues

@ide

This comment has been minimized.

Copy link
Collaborator

commented Sep 8, 2015

FYI Yosemite moved back to mDNSresponder in 10.10.4.

@mschipperheyn

This comment has been minimized.

Copy link
Author

commented Sep 8, 2015

Right. BTW. Your nvm tip did resolve the gyp issue although I still have the same errors in the XCode build

@brentvatne

This comment has been minimized.

Copy link
Collaborator

commented Sep 10, 2015

@mschipperheyn - yeah you'll need to upgrade Xcode, sorry :(

Yosemite is actually pretty good, by the way. I'm going to close this issue because there are no plans to support 6.2, and the Getting Started guide explains that 6.3 or higher is recommended. If that doesn't fix your issue then feel free to ping @ide and/or myself again on this issue and we can reopen! In the meantime, if you want to use React Native without having to upgrade Xcode you can try out Exponent 😄

@brentvatne brentvatne closed this Sep 10, 2015

@mzabriskie

This comment has been minimized.

Copy link

commented Oct 8, 2015

I can confirm that updating Xcode solves the problem. I was getting the same errors on Xcode 6.1. Updating to 7.0 works like a charm.

@brentvatne

This comment has been minimized.

Copy link
Collaborator

commented Oct 8, 2015

thanks @mzabriskie 😸

@manoj-kaushik

This comment has been minimized.

Copy link

commented Jan 13, 2016

Hi,

I am facing the same issue and getting build errors. I am using Xcode 7.2. Kindly advise

@facebook facebook locked as resolved and limited conversation to collaborators Jul 21, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.