https://github.com/realm/realm-js/issues/1774#issuecomment-404752149
切记把下载的realm-sync-cocoa-5.0.14.tar.gz文件也放到 realm-ios下面(没试过只放该文件行不行,.lock文件一定要有)
It is possible to manually download the required files, and then build the app. The steps are:
- Locate to your project directory, and find
node_modules/realm/vendor/realm-ios
. It will be empty. - Create the file
download-realm.lock
using the following command:echo SYNC_SERVER_FOLDER=sync SYNC_ARCHIVE=realm-sync-cocoa-3.7.0.tar.gz SYNC_ARCHIVE_ROOT=core > download-realm.lock
. The version number (here 3.7.0) must match the Realm Sync version in the change log. - Locate to your downloaded file
realm-sync-cocoa-3.7.0.tar.gz
excute this commandtar -xzvf realm-sync-cocoa-3.7.0.tar.gz -C yourProjectDirectory/node_modules/realm/vendor/realm-ios
. - You will find the directory is not empty any more. Copy all the files under directory
core
and paste them under directoryyourProjectDirectory/node_modules/realm/vendor/realm-ios
.