-
Notifications
You must be signed in to change notification settings - Fork 925
Description
Environment
System:
OS: macOS 10.15
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 1.40 GB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.13.0 - ~/.nvm/versions/node/v8.13.0/bin/node
npm: 6.4.1 - ~/.nvm/versions/node/v8.13.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.1, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
Android SDK:
API Levels: 23, 26, 27, 28
Build Tools: 23.0.1, 26.0.1, 26.0.3, 27.0.3, 28.0.3
System Images: android-26 | Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom, android-27 | Intel x86 Atom_64, android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: 11.1/11A1027 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.2 => 0.61.2
Description
I upgraded my project from react native 0.60.4 to 0.61.2 and could not run on iOS
The error reported was:
TypeError: Path must be a string. Received null
at assertPath (path.js:28:11)
at Object.basename (path.js:1380:5)
at Object.keys.map.depName (./node_modules/@react-native-community/cli-platform-ios/build/link/warnAboutPodInstall.js:46:41)
I manually changed this:
return dependency ? _path().default.basename(dependency.podspecPath).replace(/\.podspec/, '') : '';
to this:
return dependency && dependency.podspecPath ? _path().default.basename(dependency.podspecPath).replace(/\.podspec/, '') : '';
So now I can run the project again... The offending package was realm which still requires you to run react-native link
Reproducible Demo
This is reproducible with a fresh react-native 0.61.2 project and realm as a dependancy. Then run react-native run-ios