bcgov / TheOrgBook

A public repository of verifiable claims about organizations. A key component of the Verifiable Organization Network.
http://von.pathfinder.gov.bc.ca
Apache License 2.0
78 stars 66 forks source link

npm ERR! code ECONNRESET____________TheOrgBook/docker# ./manage build #833

Closed EtricKombat-zz closed 5 years ago

EtricKombat-zz commented 5 years ago

Hi Folks , G'day...i have a query regarding an issue i am facing while trying to proceed with the "Quick Start Guide: Running a Complete VON Network". Putting it down below.

While performing the below mentioned STEP , i'm getting hit with the ERROR . This UBUNTU 16.04 environment is inside a proxy configured network , the PROXY CONFIGURATION FORMAT that i have used is also listing down for your reference.A username & password is used for the authentication purpose.

############################## STEP USED: ############################### TheOrgBook/docker# ./manage build

ERROR GETTING: ############################### npm ERR! code ECONNRESET npm ERR! errno ECONNRESET npm ERR! network request to https://github.com/cywolf/bootstrap-theme/releases/download/v4.1.0-rc0/bcgov-bootstrap-theme-4.1.0-rc0.tgz failed, reason: read ECONNRESET npm ERR! network This is a problem related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings. npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config'

npm ERR! A complete log of this run can be found in: npm ERR! /opt/app-root/src/.npm/_logs/2019-07-18T14_44_15_427Z-debug.log

########################### PROXY CONFIGURATION FORMAT : ########################### 1)---------------------------

export HTTPS_PROXY=http://user_name>:<pass_word>@<proxy_ip: export HTTP_PROXY=http://user_name>:<pass_word>@<proxy_ip:

2)---------------------------

VirtualBox:~/.docker# cat config.json { "proxies": { "default": { "httpProxy": "http://user_name>:<pass_word>@<proxy_ip:", "noProxy": "localhost,127.0.0.0/8,*.local,host.docker.internal" } } }

3)---------------------------

VirtualBox:~/.docker# npm config list ; cli configs user-agent = "npm/3.5.2 node/v4.2.6 linux x64"

; userconfig /root/.npmrc https-proxy = "http://user_name>:<pass_word>@<proxy_ip:/" proxy = "http://user_name>:<pass_word>@<proxy_ip:/" registry = "http://registry.npmjs.org/" strict-ssl = false

; builtin config undefined globalconfig = "/etc/npmrc" globalignorefile = "/etc/npmignore" prefix = "/usr/local"

; node bin location = /usr/bin/nodejs ; cwd = /root/.docker ; HOME = /root ; "npm config ls -l" to show all defaults

###############################################

Appreciate it if you could help me fix this , and please do let me know if more info is required which might help us resolve this.Thanks in Advance.

swcurran commented 5 years ago

It looks like a problem with your connectivity from behind your (I assume) company firewall. It looks like the system is preventing you from getting to github.com, which is pretty fundamental to be able to use this. This is a stock issue with NPM vs. with TheOrgBook.

I don't have a lot of experience with it. @ianco - any ideas on how to proceed? I think you need to be looking for the issue in the NPM world rather than in our stuff.

ianco commented 5 years ago

Yes it looks like an npm issue related to proxy settings. I am able to download the file (https://github.com/cywolf/bootstrap-theme/releases/download/v4.1.0-rc0/bcgov-bootstrap-theme-4.1.0-rc0.tgz)

I don't have any experience with this but google told me this: https://www.c-sharpcorner.com/article/how-to-use-npm-install-the-command-behind-corporate-proxy-server/

You may need to update the docker scripts to add the proxy settings for npm

swcurran commented 5 years ago

Closing this issue as it is about NPM usage vs. TheOrgBook.

Glad to help further if there are issues with TheOrgBook itself.

EtricKombat-zz commented 5 years ago

Solution

Purging any npm particles in the system:

    npm config rm proxy
    npm config rm proxy --global
    npm config rm https-proxy
    npm config rm https-proxy --global
    npm config rm registry
    npm cache clean
    sudo apt-get remove nodejs nodejs-dev node-gyp libssl1.0-dev npm

Installing npm and configuring proxy

    sudo apt-get install nodejs nodejs-dev node-gyp libssl1.0-dev npm
    npm config set https-proxy http://${uname}:${pword}@${prox}:${port}--global
    npm config set https-proxy http://${uname}:${pword}@${prox}:${port}
    npm config set proxy http://${uname}:${pword}@${prox}:${port}--global
    npm config set proxy http://${uname}:${pword}@${prox}:${port}
    npm config set registry http://registry.npmjs.org
    npm config set strict-ssl false