ngx bootstrap installation .... need help to understand wht the error is about - ngx-bootstrap

im running the install cmd for ngx-bootstrap npm install ngx-bootstrap --save
but i get the following errors
npm ERR! request to https://registry.npmjs.org/ngx-bootstrap failed, reason: Hostname/IP doesn't match certificate's altnames: "Host: registry.npmjs.org. is not in the cert's altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user1\AppData\Roaming\npm-cache\_logs\2018-09-01T13_52_56_500Z-debug.log
I would like to know what could be the issue

run npm config set strict-ssl false
and re-run npm install ngx-bootstrap --save

Related

How to install npm live-server?

I am getting the following errors on trying to install npm live-server.
Can someone help.
C:\Users\kacho\Desktop\Web Development\Background Gradient\background-generator>npm install -g live-server
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to https://registry.npmjs.org/live-server failed, reason: write EPROTO 10472:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\kacho\AppData\Roaming\npm-cache\_logs\2020-04-29T15_34_35_575Z-debug.log
This error appears to be SSL related:
write EPROTO 10472:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:
npm ERR!
Perhaps you could try setting your registry as follows and reinstalling the live-server library like so:
npm config set registry https://registry.npmjs.org/
npm i live-server
As this action ensures you're connecting to npmjs with ssl.
If this doesn't work, you could try removing the ssl requirement and connecting to npmjs as follows:
npm config set registry http://registry.npmjs.org/
npm i live-server
Lastly, if neither of the above mentioned actions work (use at your own discretion) you could disable the ssl requirement altogether by doing the following:
npm config set strict-ssl false
npm i live-server
Hopefully that helps!

npm giving UNABLE_TO_GET_ISSUER_CERT_LOCALLY

I'm using Amazon Linux on AWS EC2, using npm version 1.3.6 and node version 0.10.42 (ancient, but upgrading is risky at the moment). It's worth noting that there is no proxy between this machine and the internet.
When running npm install, it's throwing me this error:
npm ERR! fetch failed https://registry.npmjs.org/fibers/-/fibers-1.0.13.tgz
npm ERR! Error: UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! at SecurePair.<anonymous> (tls.js:1381:32)
npm ERR! at SecurePair.emit (events.js:92:17)
npm ERR! at SecurePair.maybeInitFinished (tls.js:980:10)
npm ERR! at CleartextStream.read [as _read] (tls.js:472:13)
npm ERR! at CleartextStream.Readable.read (_stream_readable.js:341:10)
npm ERR! at EncryptedStream.write [as _write] (tls.js:369:25)
npm ERR! at doWrite (_stream_writable.js:226:10)
npm ERR! at writeOrBuffer (_stream_writable.js:216:5)
npm ERR! at EncryptedStream.Writable.write (_stream_writable.js:183:11)
npm ERR! at write (_stream_readable.js:602:24)
npm ERR! at flow (_stream_readable.js:611:7)
npm ERR! at Socket.pipeOnReadable (_stream_readable.js:643:5)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 4.9.51-10.52.amzn1.x86_64
npm ERR! command "node" "/usr/bin/npm" "install"
npm ERR! cwd /home/meteor-testing/Meteor_Server_Production/bundle/programs/server
npm ERR! node -v v0.10.42
npm ERR! npm -v 1.3.6
It's not just the fibers package, it's all of the requests to https://registry.npm.org erroring out.
As far as I can tell, this error means that the certificate sent by the npm registry server could not be verified against the installed set of root certificates.
I searched around, and found this "solution":
npm config set strict-ssl false
This solves the immediate problem, but makes package installations insecure.
A similarly bad alternative is:
npm config set registry http://registry.npmjs.org/
This seems to work for some requests, but most of them (indirect dependencies maybe?) get rewritten to https anyway.
If I run
curl https://registry.npmjs.org/fibers/-/fibers-1.0.13.tgz
from this machine, it works fine. So maybe npm is using the wrong set of root certs? I can find out what curl is using:
curl -vv https://registry.npmjs.org/type-of/-/type-of-2.0.1.tgz >/dev/null
...
* Connected to registry.npmjs.org (104.16.23.35) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
I did
yum update ca-certificates
to make sure that this file was up to date. Did not help.
So my next attempt was to point npm at this bundle too:
npm config set cafile /etc/pki/tls/certs/ca-bundle.crt
But this does not help either; still getting the same error.
How to make npm work, without compromising security?
The cafile option was added later, and is not available in my version of npm. It only looks at the ca option, which is set to this by default:
npm config get ca
[ '-----BEGIN CERTIFICATE-----\nMIIChzCCAfACCQDauvz/KHp8ejANBgkqhkiG9w0BAQUFADCBhzELMAkGA1UEBhMC\nVVMxCzAJBgNVBAgTAkNBMRAwDgYDVQQHEwdPYWtsYW5kMQwwCgYDVQQKEwNucG0x\nIjAgBgNVBAsTGW5wbSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxDjAMBgNVBAMTBW5w\nbUNBMRcwFQYJKoZIhvcNAQkBFghpQGl6cy5tZTAeFw0xMTA5MDUwMTQ3MTdaFw0y\nMTA5MDIwMTQ3MTdaMIGHMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExEDAOBgNV\nBAcTB09ha2xhbmQxDDAKBgNVBAoTA25wbTEiMCAGA1UECxMZbnBtIENlcnRpZmlj\nYXRlIEF1dGhvcml0eTEOMAwGA1UEAxMFbnBtQ0ExFzAVBgkqhkiG9w0BCQEWCGlA\naXpzLm1lMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDLI4tIqPpRW+ACw9GE\nOgBlJZwK5f8nnKCLK629Pv5yJpQKs3DENExAyOgDcyaF0HD0zk8zTp+ZsLaNdKOz\nGn2U181KGprGKAXP6DU6ByOJDWmTlY6+Ad1laYT0m64fERSpHw/hjD3D+iX4aMOl\ny0HdbT5m1ZGh6SJz3ZqxavhHLQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAC4ySDbC\nl7W1WpLmtLGEQ/yuMLUf6Jy/vr+CRp4h+UzL+IQpCv8FfxsYE7dhf/bmWTEupBkv\nyNL18lipt2jSvR3v6oAHAReotvdjqhxddpe5Holns6E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'm guessing it's hardcoded and rather outdated.
Okay, so let's just convert our system-wide CA bundle into a setting in the format that ca expects:
cat /etc/pki/tls/certs/ca-bundle.crt | \
awk 'cert { cert = cert "\\n" $0 }
/-----BEGIN CERTIFICATE-----/ { cert = $0 }
/-----END CERTIFICATE-----/ {
printf "ca[] = \"%s\"\n", cert;
cert = ""
}'
> ~/.npmrc
If it's stupid but it works, it ain't stupid.

Why i am getting this error while installing angular cli?

I've input the following lines:
C:\Users\Surendra>node -v
v8.11.4
C:\Users\Surendra>npm -v
5.6.0
C:\Users\Surendra>npm install -g #angular/cli
and I'm getting the following error:
npm ERR! request to https://registry.npmjs.org/#angular%2fcli failed, reason: Hostname/IP doesn't match certificate's altnames: "Host: registry.npmjs.org. is not in the cert's altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net"
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Surendra\AppData\Roaming\npm-cache\_logs\2018-09-01T15_14_45_954Z-debug.log
run npm cache clean --force and npm install npm -g
after that try to run npm config set strict-ssl false
if it doesn't work try to run npm config set registry "http://registry.npmjs.org"
Edit:
An earlier outage involving a DNS misconfiguration has lead to some ISPs caching npmjs.com as missing, a workaround for this is to use a third party DNS provider such as Cloudflare or Google, the affected caches should clear within the next 24 hours.
https://status.npmjs.org/incidents/v22ffls5cd6h

whenever I try to install npm it throws the following error,

npm install #angular/cli
npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! errno UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! request to https://registry.npmjs.org/#angular%2fcli failed, reason: unable to get local issuer certificate
thank you
There are some network issue you can use open network for this or you firewall blocked it.

Unable to install vue-cli using npm

I have installed the latest version of npm and with that, I am trying to install vue-cli using the command
npm install --global vue-cli
But I am running into issues stated below:
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to http://registry.npmjs.org/vue-cli failed, reason: write EPROTO 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:827:
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\pd0ufv\AppData\Roaming\npm-cache\_logs\2018-02-02T17_02_16_113Z-debug.log
I have set my proxy setting as well using
npm set http-proxy <proxy>
npm set https-proxy <proxy>
but didn't work as well. I am using npm version 5.6.0.
Most of the time this error is because the firewall you're behind doesn't actually support SSL peering but will mimic it if you use their http passthrough, so change your https-proxy definition accordingly:
npm set https-proxy http://example.com
Use following steps :
npm cache clean --force
npm install -g #vue/cli