kyrolos magdy
kyrolos magdy

Reputation: 393

npm WARN registry Unexpected warning for https://registry.npmjs.org/:

I am facing a strange problem here with my git-bash and my terminal when I am trying to use npm install. I get this error:

my error message

Someone told me to clear my caches and I did so, but in my case it just changed and now I get no error message. The installing process is never done and I get something like this:

the second error message

Upvotes: 5

Views: 37261

Answers (8)

F KIng
F KIng

Reputation: 498

The solution provided here worked for me.

rm ./package-lock.json
rm -r ./node_modules
npm cache clear --force

You may also want to check that you are not on a slow internet connection.

Upvotes: 3

Irina Danovich
Irina Danovich

Reputation: 93

If it happens at work in my case I was open VS Code with elevated permissions. It helps install npm.

Upvotes: 1

Anton
Anton

Reputation: 11

If the answers above didn't help, please try also to run sudo npm install. Sometimes you just don't have permission to write.

Upvotes: 1

chetana bhilawadi
chetana bhilawadi

Reputation: 31

I have also faced the same issue ("Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ETIMEDOUT: request to https://registry.npmjs.org/@angular%2fcli failed, reason: connect ETIMEDOUT 104.16.22.35:443")

Solution:

Step 1: Delete package-lock.json file from your project

Step 2: If your npm version is 5 and above. Then run the following command

npm cache verify

Step 3: Then run your parcel bunder

npm install -g parcel-bundler

Then finally, It was showing the "Network Connectivity" issue...!!!

enter image description here

Upvotes: 2

Somit Meshram
Somit Meshram

Reputation: 1

Step 1: Try to clear the cache first using

     npm cache clear --force

Step 2: Try to install again

    npm install -g @angular/cli

Upvotes: -2

U.A
U.A

Reputation: 3383

I got this error when I try to install prisma globally, I solved this

1> npm cache clear --force

2> npm install npm

Upvotes: 0

Ragavan Rajan
Ragavan Rajan

Reputation: 4407

Step 1: Delete package-lock.json file from your project

Step 2: If your npm version is 5 and above. Then run the following command

npm cache verify

Step 3: Then run your parcel bunder

npm install -g parcel-bundler  

or

npm install --save-dev parcel-bundler babel-preset-env 

Hopefully it should work.

Upvotes: 16

Njibbs
Njibbs

Reputation: 1

Downgrade npm to v4.6.1.

npm install npm@4

Version >= 5 is unstable.

Upvotes: -1

Related Questions