NPM not installing package. Hostname/IP address doesn't match certificate's altnames:

前端 未结 3 1809
长情又很酷
长情又很酷 2021-02-03 18:06

For a solution, see below

It was working yesterday, but I don\'t know what happened to it.

NPM is not installing the package. The hostname/IP addr

相关标签:
3条回答
  • 2021-02-03 18:41

    Add the following line to the /etc/hosts file:

    104.16.16.35 registry.npmjs.org
    
    0 讨论(0)
  • 2021-02-03 18:47

    Try to change the default registry:

    npm config set registry http://registry.npmjs.org
    

    For everyone who is stuck with mup deploy:

    docker: { // change to 'abernix/meteord:base' if your app is using Meteor 1.4 - 1.5 image: 'abernix/meteord:node-8.4.0-base', buildInstructions: [ 'RUN npm config set strict-ssl false' ] },

    0 讨论(0)
  • 2021-02-03 18:48

    npmjs has a DNS problem according to its incident report: DNS misconfiguration cached in ISP DNS caches.

    To solve your problem, do this:

    1. dig www.npmjs.com @1.1.1.1

      Sample output on Linux

      ; <<>> DiG 9.10.3-P4-Ubuntu <<>> www.npmjs.com @1.1.1.1
      ;; global options: +cmd
      ;; Got answer:
      ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50308
      ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1
      
      ;; OPT PSEUDOSECTION:
      ; EDNS: version: 0, flags:; udp: 1452
      ;; QUESTION SECTION:
      ;www.npmjs.com.                 IN      A
      
      ;; ANSWER SECTION:
      www.npmjs.com.          128     IN      CNAME   www.npmjs.com.cdn.cloudflare.net.
      www.npmjs.com.cdn.cloudflare.net. 151 IN A      104.16.109.30
      www.npmjs.com.cdn.cloudflare.net. 151 IN A      104.16.110.30
      
      ;; Query time: 2 msec
      ;; SERVER: 1.1.1.1#53(1.1.1.1)
      ;; WHEN: Sat Sep 01 14:05:56 UTC 2018
      ;; MSG SIZE  rcvd: 120
      
      1. Get resolved IP address: 104.16.109.30 in my case

      2. Add new entry in your /etc/hosts file

        echo "104.16.110.30 www.npmjs.com registry.npmjs.org" >> /etc/hosts

      Do not forget to remove this line at the end of the weekend.

    0 讨论(0)
提交回复
热议问题