-
Notifications
You must be signed in to change notification settings - Fork 935
Closed
Labels
Description
Environment
$ react-native info
info Fetching system and libraries information...
System:
OS: macOS 10.15
CPU: (12) x64 Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz
Memory: 7.31 GB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.3 - /usr/local/bin/node
npm: 6.12.0 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 13.1, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
Android SDK:
API Levels: 23, 25, 27, 28, 29
Build Tools: 28.0.3, 29.0.1, 29.0.2
System Images: android-28 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5900203
Xcode: 11.1/11A1027 - /usr/bin/xcodebuild
npmPackages:
react: 16.11.0 => 16.11.0
react-native: 0.61.2 => 0.61.2
Description
On a current project, after removing the package-lock.json and re-running npm install, a pod install in the ios directory fails:
$ pod install
Command `config` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project.
[!] Invalid `Podfile` file: 767: unexpected token at ''.
# from /Users/ourvoiceusa/git/HelloVoter/mobile/ios/Podfile:44
# -------------------------------------------
#
> use_native_modules!
# end
# -------------------------------------------
Reproducible Demo
git clone https://github.com/OurVoiceUSA/HelloVoter.git
cd HelloVoter/mobile
npm install
cd ios
pod install
Then if you remove package-lock.json and re-install and try the npx react-native config from the ios directory again:
rm -f package-lock.json
npm install
cd ios
pod install
I believe this is due to npx react-native config failing to work inside the ios directory on the newer version of @react-native-community/cli-platform-ios
$ cd ios
$ npx react-native config
Command `config` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project.
Here's the package-lock.json change that broke it:
@@ -1295,12 +1292,13 @@
}
},
"@react-native-community/cli-platform-ios": {
- "version": "3.0.0-alpha.2",
- "resolved": "https://registry.npmjs.org/@react-native-community/cli-platform-ios/-/cli-platform-ios-3.0.0-alpha.2.tgz",
- "integrity": "sha512-37FtnrWTUP0EzQ83raplcnOUlEzRCsDrsxGsUnBso33fNPBAJ4Ei6L/BuJPJZ+sCAWFbyO1XhVED0c1QuP0cww==",
+ "version": "3.0.0-alpha.7",
+ "resolved": "https://registry.npmjs.org/@react-native-community/cli-platform-ios/-/cli-platform-ios-3.0.0-alpha.7.tgz",
+ "integrity": "sha512-6qM5LpzhCEhkb9MC+nxrOHX2TxoN4qm8+Vg9byIW/wExl8dWCTneRUbQ5qFlkkMksS2U63LiRVSCXK08d6x5bA==",
"requires": {
- "@react-native-community/cli-tools": "^2.8.3",
+ "@react-native-community/cli-tools": "^3.0.0-alpha.7",
"chalk": "^2.4.2",
+ "js-yaml": "^3.13.1",
"xcode": "^2.0.0"
},
"dependencies": {
Thanks,
smakosh, aniruddhashevle, Orlandster and 77TecShaeer