npm install fails while downloading binary behind corporate proxy with the following error:
Error: HTTP proxy request for github.com/oracle/node-oracledb/releases/download/v2.1.1/oracledb-v2.1.1-node-v57-linux-x64.gz failed with code 403
Error occurs when running npm install from docker behind corporate proxy. NPM install tries to download binary from github but the request is rejected by our proxy.
I reproduced the problem by running the node package/oracledbinstall.js directly. I'm getting the same 403 error.
The problem is due to an invalid host header in the request: https://github.com/oracle/node-oracledb/blob/master/package/oracledbinstall.js#L203
I added a colon between hostname and port:
'host': hostname +':' + PORT,
This fixed the problem.
Nice! Thanks for reporting this. We'll get this corrected.
When can we expect a fix published to NPM? This is just to know whether I should revert my dependencies to 1.x or wait for the fix.
@bjouhier I just pushed 2.1.2 with the fix. Thanks for the patch.
Thanks @cjbj. This is speed!
Getting nasty error when executing "npm install oracledb -s".
I have set the npm config with "proxy" and "https-proxy" and able to download other packages with no issues. How ever with oracledb, the situation is ugly.
**### ---------------------------------------------------------------------------------------------------------
oracledb ERR! NJS-054: Binary build/Release/oracledb.node was not installed.
oracledb ERR! Failed to install binary package oracledb-v2.3.0-node-v57-win32-x64.gz
oracledb ERR! unable to get local issuer certificate
oracledb ERR! For help see https://oracle.github.io/node-oracledb/INSTALL.html#troubleshooting
The github URL shed no light.
Note the install instructions show how to set the proxy via environment variables and say:
The node-oracledb binary installer cannot use the npm config set https-proxy value.
This is because npm is not doing the download of the binary.
There is a workaround due to land in https://github.com/oracle/node-oracledb/pull/919