7
7

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 ios Archiveで main.jsbundle エラーが起きた場合の対策

Posted at

react-nativeでdebug(シミュレータ)ではbuildできるのに、release buildではerrorがおきて、buildできない場合の対処方法です。

エラー内容: main.jsbundle does not exist

原因: xxx.app 内部にreactnative本体であるmain.jsbundleが無いから

対策: xcodeでTARGETS -> BuildPhases -> Bundle React Native code and images
そこの NODE_BINARYを変更

   変更前 export NODE_BINARY=node
    
   変更後 export NODE_BINARY=/Users/ユーザー名/.nodebrew/current/bin/node 

補足: 私はnodeをnodebrewで入れてたので、それが原因だったかなと、nodebrewなしで素のnode.jsだったら、
   そのままで良いのだと思います。

以上

7
7
1

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
7
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?