Miscellaneous Warning ECONNRESET while setting up vue app - node.js

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

Related

How do I remove corporate proxy? I have tried everything, nothing works

I have an artifactory preventing me from setting up any new apps or libraries. When I had access to corporate VPN, I could bypass it.
I am basically getting this when trying any npm install:
npm ERR!
403 Forbidden - GET https:// (artifactory link)
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.
I have tried this:
npm config rm proxy
npm config rm https-proxy
I have even reinstalled Git and Node. Nothing works. Please help!
Try to set noproxy
https://docs.npmjs.com/cli/v8/using-npm/config#noproxy
npm config set noproxy "my-proxy-host"
You can set your npm registry to the default registry
use the following command:
npm config set registry https://registry.npmjs.org/

Request to http://registry.npmjs.org/check failed, reason: connect ECONNREFUSED

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!

Unable to install ionic in windows using npm

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

Unable to install electron from npm

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.

Can't install grunt-cli but can install bower

I have a linux box behind a no auth proxy.
I have configured git to use https instead of git.
url.https://.insteadof=git://
I have set my http_proxy and https_proxy environment variables and also the npm proxy.
; cli configs
user-agent = "npm/3.8.6 node/v6.0.0 linux x64"
; userconfig /jenkins/.npmrc
https-proxy = "{host}:8060"
proxy = "{host}:8060"
I can install bower with:
npm install -g bower
but when i try
npm install -g grunt-cli
i get:
npm ERR! fetch failed https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz
npm WARN retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=connect EINVAL 0.0.31.124:80 - Local (0.0.0.0:0)
....
npm ERR! network tunneling socket could not be established, cause=connect EINVAL 0.0.31.124:80 - Local (0.0.0.0:0)
I have tried with npm version
3.8.6 / 2.15.1
Any ideas why i can install bower and not grunt-cli from same account in same session (i can even install grunt globally, and clone grunt-cli)?
UPDATES
1: I am able to do
curl -O https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz
with success, the npm https-proxy is equal to $https_proxy value.
The problem was my npm proxy was host:port, without the "http://" prefix. like the environment variable. works now.
I have no idea why bower installed though.
can you try
npm install -g grunt-cli
this looks like a network problem with your proxy configuration.
Update to the latest version of node and npm, and use the correct proxy settings.

Resources