I'm trying to install ionic using npm command
npm install -g ionic cordova
But installation failed. I'm have setup the proxy as well.
npm version:5.6.0
Proxy setup
npm config set strict-ssl false
npm config set registry "http://registry.npmjs.org/"
npm config set proxy "http://username:password#proxyip:8080/"
npm config set https-proxy "http://username:password#proxyip:8080/"
Since I cannot post the complete error details from the log, I have extracted the error message alone.
silly fetchPackageMetaData error for bn.js#^4.1.1 request to
http://registry.npmjs.org/bn.js failed, reason: connect ECONNREFUSED
proxyip:8080
Related
When I run this commend "npm install -g check" on cmd I have the following error
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! FetchError: request to http://registry.npmjs.org/check failed, reason: connect ECONNREFUSED 10.141.0.60:80
using:
OS: Windows 10
Node Version: v8.10.0
npm version: 5.6.0
Domain (AD): kmsd
User: mu789
Proxy: 10.40.140.60:4000
I tried following commends, but still have the same issue
npm set strict-ssl=false
npm config set registry "http://registry.npmjs.org/"
npm config set proxy http://kmsd\mu789:ab_132#10.40.140.60:4000/
npm config set https-proxy http://kmsd\mu789:ab_132#10.40.140.60:4000/
--
npm config set proxy http://kmsd%5Cmu789:ab_132#10.40.140.60:4000/
npm config set https-proxy http://kmsd%5Cmu789:ab_132#10.40.140.60:4000/
--
npm config set proxy http://mu789:ab_132#10.40.140.60:4000/
npm config set https-proxy http://mu789:ab_132#10.40.140.60:4000/
--
.npmrc
proxy=http://kmsd\mu789:ab_132#10.40.140.60:4000/
https-proxy=http://kmsd\mu789:ab_132#10.40.140.60:4000/
--
.npmrc
proxy=http://"kmsd\mu789:ab_132"#10.40.140.60:4000
https-proxy=http://"kmsd\mu789:ab_132"#10.40.140.60:4000
--
.npmrc
proxy="http://kmsd\mu789:ab_132#10.40.140.60:4000/"
https-proxy="http://kmsd\mu789:ab_132#10.40.140.60:4000/"
I tried all methods in Is there a way to make npm install (the command) to work behind proxy? but still have the issue.
format for proxy "http://mu789:kmsd#10.40.140.60:4000" which should be put in .npmrc file.
Please try this and check if you still face this isue.
Assuming kmsd is password for the corp
I had the same issue, was able to successfully install it outside my company's corporate network or try adding the proxy to proxy bypass list. Hope it helps!
I am trying to set up vue app by vue-cli. Everything went well until I typed
npm install
to install dependencies. It was an error with https so I changed it to http
but then I get this log:
npm WARN registry Unexpected warning for http://registry.npmjs.org/: Miscellaneous Warning ECONNRESET: request to http://registry.npmjs.org/debug failed, reason: socket hang up
npm WARN registry Using stale package data from http://registry.npmjs.org/ due to a request error during revalidation.
I also used
npm config rm proxy
npm config rm https-proxy
and still had the same issue.
Manually change https to http
npm config set registry="http://registry.npmjs.org/"
npm config set strict-ssl false
if you are behind proxy else ignore this
npm config set proxy http://username:password#10.80.81.180:80
npm config set https-proxy http://username:password#10.80.81.180:80
Install vue-cli
npm install -g vue-cli
Setup vuejs project
vue-init webpack-simple vueproject
Install dependencies
npm install
Now your vuejs boilerplate project setup is complete
Update #1
First clear npm cache and then try the above steps
npm cache clear --force
I am trying to install electron on my ubuntu 16.04, i already have a working nodejs and npm. But suddenly I am unable to install modules by type:
sudo npm install electron
Below is the response am getting:
npm WARN registry Unexpected warning for https://registry.npmjs.org/:
Miscellaneous Warning EAI_AGAIN: request to
https://registry.npmjs.org/electron failed, reason: getaddrinfo
EAI_AGAIN registry.npmjs.org:443
npm WARN registry Using stale package data from
https://registry.npmjs.org/ due to a request error during
revalidation.
> electron#1.7.10 postinstall
/home/arthur/Documents/Programming/Electron/node_modules/electron
> node install.js
`/home/arthur/Documents/Programming/Electron/node_modules/electron/
install.js:48
throw err
^
Error: read ECONNRESET
at _errnoException (util.js:1024:11)
at TLSWrap.onread (net.js:615:25)
npm WARN y#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron#1.7.10 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron#1.7.10 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely
additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/arthur/.npm/_logs/2017-12-19T10_25_52_312Z-
debug.log
The issue is related to proxy configuration. Based on this answer, you can try the following.
First, try to remove if there exists your initial config:
npm config rm proxy
npm config rm https-proxy
And optionally if needed, try to set your proxy config
npm config set proxy proxy-url
npm config set https-proxy proxy-url
I tried everything but it seems I was using CENTOS which allowing me to install electron. I got help from FlashJonas: and tried installing electron again and it was installed as expected.
sudo npm install electron -g --verbose --unsafe-perm=true
Removing the proxy and https-proxy worked for me, just in case there is another person with a similar situation.
just enter the following in your terminal:
npm config rm proxy
npm config rm https-proxy
Do Any of the following. It Work for me.
Change Internet Connection.
Delete all electron file and then install npm insatll electron.
Try to install old version of electron.
This Error is because it can't able to download "electron-v11.2.1-win32-x64.zip" file. So Change Internet Connection it work for me.
I am behind a corporate proxy and had similar issues. None of the options above helped. In the end, I followed the instructions below to reconstruct the electron cache manually, so that it will not have to hit the network to download the binaries:
https://www.electronjs.org/docs/v14-x-y/tutorial/installation#custom-mirrors-and-caches
Basically I used a personal laptop (i.e. not behind the proxy) to install the latest electron on some test app, and then copied the %LOCALAPPDATA%\electron\Cache folder from my personal to the corporate laptop. Everything worked fine.
I need to install Express Framework for my application.
This is the error which I am obtaining. I tried to set Environment varaibales for my computer towards npm as http://username:password#proxy:port for both http and https.
Also, I have tried the code such as
npm config set proxy http://username:password#proxy:port -g
npm config set https-proxy http://username:password#proxy:port -g
npm config set strict-ssl false.
Even then I am getting the below error.
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! unable to verify the first certificate
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
Any help regarding installing Express Framework would be appreciated.
I have also faced same problem, but your last option i.e.
npm config set strict-ssl false worked for me.
after run this command in command prompt I installed express framework with following command:
npm install -g express-generator
Even I got the same error while installing angular cli...
I have used the command "npm config set strict-ssl false" in cmd and then installed using npm install -g #angular/cli...It worked...Thanks
npm config set strict-ssl false should fix it.
In my case it was in a docker environment and I did not copied the .yarnrc that included the sstrict-ssl false directive to the image in the build phase.
Issue:
>npm install
npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! errno UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! request to https://registry.npmjs.org/#webassemblyjs/ieee754/-/ieee754-1.7.6.tgz failed, reason: unable to verify the first certificate
Solution:
npm install worked after executing this command:
npm config set strict-ssl false
Whenever I run npm install , I get an error
Error: SELF_SIGNED_CERT_IN_CHAIN.
How to resolve this error?
Even I used to get this error. Try following steps.
Steps to be followed to overcome this error:
1) Run these three commands in a sequence.
npm config set strict-ssl false
npm update npm –g
npm config set strict-ssl true
2) Set properties proxy and https-proxy in the npm config using these commands:
npm config set proxy=“http://"proxy-name":8080”
npm config set https-proxy=“http://"proxy-name":8080”
Then try installing your packages using commands you tried.
Hope this helps.