Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Couldn't find package "XXX" on the "npm" registry

Tags:

node.js

npm

I am having problems with yarn install.

The package will install correctly with npm install but when installing with yarn the above error is produced. error Couldn't find package "google-map-react" on the "npm" registry.

.npmrc

@companyname:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=476f....

I will admit, when removing the .npmrc file the error is still there. Which makes me think this must be some issue.

I also am making the assertion that the following command simply creates the .npmrc file in my home directory? npm login --registry=https://npm.pkg.github.com --scope=@companyname

I would ideally like to be able to install external NPM packages.

like image 774
Jamie Hutber Avatar asked Oct 26 '25 05:10

Jamie Hutber


1 Answers

So I've found it after too long. I was seeing this error as yarn was using its config to connect to npm: npm.github.registry

I had previously worked in EuroStar which had their own private npm registry. Thus it was failing on simple packages because there npm is completely locked down.

So simple command:

yarn config delete registry
like image 56
Jamie Hutber Avatar answered Oct 28 '25 18:10

Jamie Hutber



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!