0

enter image description hereUnable to install typescript with below error :

npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.

npm ERR! code E500

npm ERR! 500 Internal Server Error: typescript@https://registry.npmjs.org/typescript/-/typescript-3.0.1.tgz

npm ERR! A complete log of this run can be found in:

npm ERR! C:\Users\Sony\AppData\Roaming\npm-cache_logs\2018-09-01T13_12_48_404Z-debug.log

2
  • Which version of npm/node are you using? Might be an issue cause of an older version. Commented Sep 1, 2018 at 13:34
  • node --version is v8.11.3 & npm version is 5.6.0 Commented Sep 1, 2018 at 13:41

1 Answer 1

3

This is a global problem. They say that it will be fixed in weekend here

A temporary solution:

Open Terminal dig registry.npmjs.com @1.1.1.1

It will give you an IP address. Than add it to your etc/hosts file.

How to add IP address to etc/hosts OSX/Linux/Windows

Restart maybe required. After that, you can use npm
It worked for me.

UPDATE

Problem is solved. You may remove the line from your etc/hosts file.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.