zhangtaii / react-native-google-place-picker

React Native Wrapper of Google Place Picker for iOS + Android.
MIT License
185 stars 54 forks source link

Error occured during executing "${ command }" command #1

Closed schmooie closed 8 years ago

schmooie commented 8 years ago

First of all thanks for writing this wrapper.

I did $ npm install react-native-google-place-picker --save and then a $ react-native link and ran into this issue:

$ react-native link
Preparing to link react-native-google-place-picker for iOS
Checking CocoaPods...
CocoaPods already installed
rnpm-install info Linking react-native-google-place-picker android dependency
rnpm-install info Android module react-native-google-place-picker has been successfully linked
rnpm-install info Linking react-native-google-place-picker ios dependency
rnpm-install info iOS module react-native-google-place-picker has been successfully linked
Checking Podfile in iOS project (/Users/samlau/Dev/alert_ios/ios/Podfile)
Adding Podfile to iOS project
Installing Pods
node_modules/react-native-google-place-picker/bin/cocoapods.sh: line 45: pod: command not found
/Users/samlau/Dev/alert_ios/node_modules/react-native/local-cli/rnpm/core/src/makeCommand.js:19
        throw new Error(`Error occured during executing "${ command }" command`);
        ^

Error: Error occured during executing "node_modules/react-native-google-place-picker/bin/cocoapods.sh" command
    at ChildProcess.prelink (makeCommand.js:19:15)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:821:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

This is my package.json:

{
  "name": "alert_ios",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start"
  },
  "dependencies": {
    "axios": "^0.13.1",
    "lodash": "^4.15.0",
    "momentjs": "^1.1.15",
    "react": "15.2.1",
    "react-native": "^0.31.0",
    "react-native-google-place-picker": "^1.1.2",
    "react-native-navbar": "^1.5.0",
    "react-native-swipeout": "git+https://github.com/magrinj/react-native-swipeout",
    "react-redux": "^4.4.5",
    "redux": "^3.5.2",
    "redux-thunk": "^2.1.0"
  },
  "devDependencies": {
    "babel-eslint": "^6.1.2",
    "eslint": "^3.3.1"
  }
}
zhangtaii commented 8 years ago

From your logs, pod: command not found is the cause of failure.

To solve this, reinstall CocoaPods: gem install cocoapods

Check CocoaPods/CocoaPods#3736 to get more info.