SAP / node-rfc

Asynchronous, non-blocking SAP NW RFC SDK bindings for Node.js
Apache License 2.0
252 stars 73 forks source link

install failure() #21

Closed ElanUpper closed 7 years ago

ElanUpper commented 7 years ago

hello , I faced issue about “Failed at the node-rfc@0.1.9 preinstall script 'npm install node-pre-gyp'.” and the full infomation like following :

npm ERR! node-rfc@0.1.9 preinstall: `npm install node-pre-gyp`
npm ERR! Exit status 4294963214
npm ERR!
npm ERR! Failed at the node-rfc@0.1.9 preinstall script 'npm install node-pre-gyp'.

then I found "node-pre-gyp: python (v2.7 recommended, v3.x.x is not supported)" my python version was v3.5 ,
Isthat affect error? or others ?

MarcTimperley commented 7 years ago

You will need python 2.7 to build any projects as 3.5 is not supported. This is a common issue. However, there are still build issues with this version

MarcTimperley commented 7 years ago

The way I got this to work on Windows was using the 32 bit version of python 2.7, the 32 bit version of the nwsdk and the 6.9.1 (64bit) version of node. I cloned the repo from here (not a standard npm install node-rfc) and then switched to the node_modules\node-rfc folder and ran npm install from there. I have the node, python and nwsdk\lib folders in my path and this is working for me.

io-pa commented 7 years ago

Python 2.7 is only needed if you are building the project yourself. If you are using windows/linux x64 with node 4.6.0 or 6.9.1 you can use the prebuilt binaries via npm install node-rfc.

ElanUpper commented 7 years ago

it works, thank you @MarcTimperley @io-pa, but still have one thing. if I want to zip folder node-rfc, May I get your help to realize which node-rfc/folders is necessary in project? and here is the full list download from github.

NODEJSRFCCONN\NODE_MODULES\NODE-RFC |.bin ├─build ├─demo ├─doc ├─lib ├─module_mods ├─src └─test

bsrdjan commented 7 years ago

To use the connector, a compiled binary is enough, like in a previous unit test version:

https://github.com/SAP/node-rfc/blob/690f1351ef17f0183bad6302891cb29ba22875cd/test/test.js#L18

To build from source the repository is required.

bsrdjan commented 7 years ago

Closing, looks solved.