prscX / react-native-bottom-action-sheet

React Native: Native Bottom Action Sheet
Apache License 2.0
634 stars 48 forks source link

Error when install on Ubuntu #3

Closed vodchella closed 6 years ago

vodchella commented 6 years ago

I have this error when try to install react-native-bottom-action-sheet:

> react-native-bottom-action-sheet@0.0.1 postinstall /home/<my-project-dir>/node_modules/react-native-bottom-action-sheet
> cd ./ios && pod install

sh: 1: pod: not found
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! react-native-bottom-action-sheet@0.0.1 postinstall: `cd ./ios && pod install`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the react-native-bottom-action-sheet@0.0.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

But i'm on Ubuntu, not on iOS

prscX commented 6 years ago

Thanks @vodchella for raising the issue.

I have a limited understanding of Ubuntu but in my opinion looks like CocoaPods is not install on your system. I guess using below command we can install CocoaPods:

[sudo] gem install cocoapods

Thanks Pranav

vodchella commented 6 years ago

in my opinion looks like CocoaPods is not install on your system

It's true, there is no CocoaPods and Ruby installed on my machine. Can react-native-bottom-action-sheet works without it on Ubuntu or other Linux system?

prscX commented 6 years ago

Sorry, not possible @vodchella, since this library depends on other native library which is distributed through CocoaPods only.

Is their any way we can get Cocoa on Ubuntu or Linux system?

Thanks Pranav

prscX commented 6 years ago

Hi @vodchella,

I have given a detailed thought and coming weekend I am planning to remove postinstall script from package.json in order to make it work across platforms (MAC, Windows, Linux).

Meantime for quick fix you can fork this library and remove the script in order to proceed.

Thanks Pranav

prscX commented 6 years ago

Thanks @vodchella for suggesting the improvement.

I have removed postinstall script from package.json, now we need to manually install iOS library pods using below command:

cd ./node_modules/react-native-bottom-action-sheet/ios/ && pod install

Can you please download latest V0.0.5 and verify the same. Please let me know in case you still face any issues.

Thanks Pranav

vodchella commented 6 years ago

It seems to be Ok on Ubuntu: _015 Great, thanks!