10
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

react−nativeの最初につまずいたところメモφ(。_。 )

Posted at

nvm経由でnode入れた場合、react−nativeのiOSビルドが失敗する

nvm経由でnode入れた場合、

Command /bin/sh failed with exit code 127
react-native: command not found

というエラーでiOSビルドに失敗します。

https://github.com/facebook/react-native/issues/3974
を参考に、

../node_modules/react-native/packager/react-native-xcode.sh

react-native bundle

の前に

source ~/.bash_profile

を追加したら治りました。

複数のreact−nativeのリポジトリを行き来してビルドしていると、 Invariant Violation エラーが出る

Error: Invariant Violation: Application SampleApp has not been registered. This is either due to a require() error during initialization or failure to call AppRegistry.registerComponent.
 stack: 

こんなエラーが出ます。

http://stackoverflow.com/questions/29287987/invariant-violation-application-awesomeproject-has-not-been-registered-when-b
を参考に、ターミナルで

ps aux | grep react

でreactのプロセスが残っていたらkillする。
で、ビルドしなおしたら治りました。

10
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?