Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error During npm install #21

Closed
ArcadeRenegade opened this issue Apr 15, 2017 · 12 comments
Closed

Error During npm install #21

ArcadeRenegade opened this issue Apr 15, 2017 · 12 comments

Comments

@ArcadeRenegade
Copy link

ArcadeRenegade commented Apr 15, 2017

Hi, I get an error when trying to install this package using npm. Seems a post-install .sh script is failing.

OS: Windows 10
Node: v6.10.0
npm: v3.10.10

202 verbose stack Error: react-native-razorpay@1.2.0 postinstall: ./download_ios_framework.sh
202 verbose stack Exit status 1
202 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
202 verbose stack at emitTwo (events.js:106:13)
202 verbose stack at EventEmitter.emit (events.js:191:7)
202 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
202 verbose stack at emitTwo (events.js:106:13)
202 verbose stack at ChildProcess.emit (events.js:191:7)
202 verbose stack at maybeClose (internal/child_process.js:877:16)
202 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
203 verbose pkgid react-native-razorpay@1.2.0
204 verbose cwd C:\Users...\Documents\Visual Studio 2017\Projects\ReactNativeTest\ReactNativeTest
205 error Windows_NT 10.0.14393
206 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "i" "react-native-razorpay" "--save"
207 error node v6.10.0
208 error npm v3.10.10
209 error code ELIFECYCLE
210 error react-native-razorpay@1.2.0 postinstall: ./download_ios_framework.sh
210 error Exit status 1
211 error Failed at the react-native-razorpay@1.2.0 postinstall script './download_ios_framework.sh'.
211 error Make sure you have the latest version of node.js and npm installed.
211 error If you do, this is most likely a problem with the react-native-razorpay package,
211 error not with npm itself.
211 error Tell the author that this fails on your system:
211 error ./download_ios_framework.sh
211 error You can get information on how to open an issue for this project with:
211 error npm bugs react-native-razorpay
211 error Or if that isn't available, you can get their info via:
211 error npm owner ls react-native-razorpay
211 error There is likely additional logging output above.
212 verbose exit [ 1, true ]

@PARAGJYOTI
Copy link

@ArcadeRenegade Bro , you cannot install it via npm . The package have some issues . I think razorpay team should fix it soon . But you can do it just by downloading the zip file from github and rename it from react-native-razorpay-master to react-native-razorpay and copy to node-modules-folder . (note that github zips have two layers of master folder , so copy the folder that's inside , like react-native-razorpay-master/reat-native-razorpay-master )
I have no idea about ios , since I am making it for android . But the installation instructions they provided for ios should work . By the way how you are developing ios on windows , VirtualBox?

@ArcadeRenegade
Copy link
Author

Thanks. I'll try a manual installation. I'm not doing any iOS development right now. Just Android. That is why I am confused about this ./download_ios_framework.sh error.

@PARAGJYOTI
Copy link

@ArcadeRenegade Owh fine.. Just ignore that . Mention me if you have further problem . Razorpay is good , they are cutting-edge. Where do you live , bangalore ?

@ArcadeRenegade
Copy link
Author

I'm in California. My friend and I are developing app to be released in India :)

RazorPay seems very good. It is a lot like what we have here in the US called Stripe.

@PARAGJYOTI
Copy link

@ArcadeRenegade Exactly . I loved stripe , but since they are not in India yet , I had to use razorpay . A startup , but they seems good too . Happy developing .

@ArcadeRenegade
Copy link
Author

I got it working! Thanks @PARAGJYOTI

@PARAGJYOTI
Copy link

@ArcadeRenegade You are welcome !

@akshaybhalotia
Copy link
Contributor

@ArcadeRenegade @PARAGJYOTI I think I might have a hint as to why this is happening. Lemme speak to the other devs and we'll think of a fix.

@aneesv
Copy link

aneesv commented Apr 29, 2017

@ArcadeRenegade

We had the same issue when we try to run npm install on Windows

Solved by removing ./ from download_ios_framework.sh and package.json ( postinstall Line 8 )

#!/bin/sh
## Run this script after installing the module

curl -O http://downloads.razorpay.com/Razorpay.framework-0.15.0.zip
unzip Razorpay.framework-0.15.0.zip
rm -rf ios/Razorpay.framework 
cp -r Razorpay.framework ios
{
  "name": "react-native-razorpay",
  "version": "1.2.0",
  "description": "React Native wrapper for Razorpay",
  "main": "RazorpayCheckout.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "postinstall": "download_ios_framework.sh"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/razorpay/react-native-razorpay.git"
  },
  "dependencies": {
    "react-native": ">=0.40.0"
  },
  "peerDependencies": {
    "react-native": ">=0.40.0"
  },
  "keywords": [
    "react-native",
    "razorpay",
    "payments"
  ],
  "author": "Razorpay Developers <developers@razorpay.com> (https://razorpay.com/)",
  "license": "MIT",
  "homepage": "https://github.com/razorpay/react-native-razorpay#readme"
}

@ArcadeRenegade
Copy link
Author

@aneesv thanks that worked. forked the repo, applied the fix, then npm-installed from my fork repo.

@akshaybhalotia
Copy link
Contributor

You guys should try this: 4726b8b

@ArcadeRenegade
Copy link
Author

that works! thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants