rxaviers / cldr-data-npm

Npm module for Unicode CLDR JSON data
MIT License
42 stars 28 forks source link

Error while installing cldr-data over the proxy #39

Open skoczylm opened 7 years ago

skoczylm commented 7 years ago

Cannot install cldr-data over the proxy:

$ npm install cldr-data

cldr-data@30.0.1 install H:\szg2_poc_www\node_modules\cldr-data node install.js

GET https://github.com/unicode-cldr/cldr-core/archive/30.0.2.zip GET https://github.com/unicode-cldr/cldr-dates-modern/archive/30.0.2.zip GET https://github.com/unicode-cldr/cldr-cal-buddhist-modern/archive/30.0.2.zip GET https://github.com/unicode-cldr/cldr-cal-chinese-modern/archive/30.0.2.zip GET https://github.com/unicode-cldr/cldr-cal-coptic-modern/archive/30.0.2.zip GET https://github.com/unicode-cldr/cldr-cal-dangi-modern/archive/30.0.2.zip GET https://github.com/unicode-cldr/cldr-cal-ethiopic-modern/archive/30.0.2.zip GET https://github.com/unicode-cldr/cldr-cal-hebrew-modern/archive/30.0.2.zip GET https://github.com/unicode-cldr/cldr-cal-indian-modern/archive/30.0.2.zip GET https://github.com/unicode-cldr/cldr-cal-islamic-modern/archive/30.0.2.zip GET https://github.com/unicode-cldr/cldr-cal-japanese-modern/archive/30.0.2.zip GET https://github.com/unicode-cldr/cldr-cal-persian-modern/archive/30.0.2.zip GET https://github.com/unicode-cldr/cldr-cal-roc-modern/archive/30.0.2.zip GET https://github.com/unicode-cldr/cldr-localenames-modern/archive/30.0.2.zip GET https://github.com/unicode-cldr/cldr-misc-modern/archive/30.0.2.zip GET https://github.com/unicode-cldr/cldr-numbers-modern/archive/30.0.2.zip GET https://github.com/unicode-cldr/cldr-segments-modern/archive/30.0.2.zip GET https://github.com/unicode-cldr/cldr-units-modern/archive/30.0.2.zip H:\szg2_poc_www\node_modules\cldr-data-downloader\lib\download.js:51 throw error; ^

Error: unable to verify the first certificate at Error (native) at TLSSocket. (_tls_wrap.js:1060:38) at emitNone (events.js:86:13) at TLSSocket.emit (events.js:185:7) at TLSSocket._finishInit (_tls_wrap.js:584:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:416:38)

My proxy settings (fiddler proxy for testing purposes): .nmrpc proxy=http://localhost:8888/ proxy-https=http://localhost:8888 strict-ssl=false

I've already tried to set environment variable: HTTP_PROXY to match configuration used in .npmrc without any results.

Yves-Be commented 7 years ago

I had the same problem, but I managed to install the packages by executing these commands before executing the npm install:

set HTTP_PROXY=http://proxy:port set HTTPS_PROXY=http://proxy:port set STRICT_SSL=false

Of course, this only works temporarily in the current command session. But setting it as an environment variable requires you to set those on every system where you want to build. A better solution might be to have a script that sets the variables before calling npm install.

v-echo commented 6 years ago

I've got the same error, but neither solution worked.

jonfreedman commented 5 years ago

Is it possible to update the downloader to use the proxy / https-proxy settings of NPM rather than the system settings? This is particularly annoying when trying to build using the frontend-maven-plugin which passes the relevant Maven proxy settings through to NPM but the only way I was able to get this to work is to additionally set the http_proxy and https_proxy environment variables.