0
votes

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

1
Which version of npm/node are you using? Might be an issue cause of an older version. - Horia Coman
node --version is v8.11.3 & npm version is 5.6.0 - piyush vijayvargiya

1 Answers

3
votes

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.