Search code examples
androidreact-nativexcode8

Invalid symlink in node_modules error when trying to deploy to simulator (RN 0.45)


After making an upgrade from 0.39.2 t 0.45.1 and updating node packages and fixing about 50 issues in xcode my build succeeds but when trying to deploy on simulator I get.

Installing build/Build/Products/Debug-iphonesimulator/AppName.app Installing build/Build/Products/Debug-iphonesimulator/AppName.app An error was encountered processing the command (domain=MIInstallerErrorDomain, code=70):

invalid symlink at /Users/dob99/Library/Developer/CoreSimulator/Devices/9BEB7AD7-F8CD-4CF9-BEA5-B995D2CE07E9/data/Library/Caches/com.apple.mobile.installd.staging/temp.6ItzQQ/extracted/AppName/node_modules/react-native/third-party/glog-0.3.4/test-driver Launching An error was encountered processing the command (domain=NSMachErrorDomain, code=-308): The operation couldn’t be completed. (Mach error -308 - (ipc/mig) server died)

react-native-cli: 2.0.1

react-native: 0.45.1

xCode: 8.3.3

Please advice.

Note: I was able to reproduce this later on building for android too. The fix with the unlink command from below fixed the android issue too.


Solution

  • My team was getting the same error yesterday. This apparently fixed it for them:

    unlink node_modules/react-native/third-party/glog-0.3.4/test-driver

    Here's more info about the bug: https://github.com/facebook/react-native/issues/14417