mat stepper bar is not in the npm registry

Viewed 161

Our app depends on this npm package, all of a sudden it stopped working, and not able to install it again through npm i. How can I fix this?

Error while installing it: mat stepper bar is not in the npm registry

Below is the message from their official webpage

Mat-stepper-bar is a JavaScript package in the npm registry that has been compromised. Our team is working on it :( If you have any questions, please email us at ngmicroapp@gmail.com

1 Answers

Package status: deleted?

It looks like the package was deleted from NPM recently, since it is still in Google's cache.

Recourse

Unfortunately, there is not much you can do. There is no repository listed in the README or in the published package details - if you knew that the source code lived on a repo in GitHub, you could install the package from there, instead.

Public Mirror?

Your best bet is to try to find a public NPM mirror that still has the package. Aliyun seems to have one, although I am not very familiar with that site and do not know if that is a reliable source.

To prevent this in the future

Use a local NPM mirror

Going forward, you should keep a local NPM mirror if you use volatile packages.

Vet your packages

A better rule of thumb, however, is to avoid relying on relatively unused and undeveloped packages.

Before using a package, ensure that it:

  • meets basic package cleanliness requirements, such as listing a repository
  • is well-documented
  • is well-tested
  • has a consistent development history, which makes it less likely to be abandoned
  • has a minimum number stars on GitHub OR forks OR npm downloads

Using a package that fails to meet these requirements adds technical debt to your product, as you are more likely to encounter bugs, take longer to understand undocumented functions, or may discover that the package is renamed or deleted.

Related