Search code examples
npmnpm-installgithub-package-registry

Packages distributed in the github registry cannot be installed


I created and published package which depends on the typeorm package, to the github registry.

The deployment was successful, but when I try install the package, I got a message:

“Package not found.” cause npm try to  install my package's dependency from "npm.pkg.github.com".

I want to allow only dependent packages to be installed from registry.npmjs.com. What should I do?

I tried this command,

 npm install @narumir/[email protected] --registry https://npm.pkg.github.com 

and I got this error.

install package error


Solution

  • I fixed it.

    The problem occured because I missused the --registry npm.pkg.github.com option in the installation command.

    Using simply npm install package-name worked for me.