2

I'm using yarn to manage my npm packages. If I do npm install, it all works fine. However, if I try doing yarn install it fails with the following error:

info No lockfile found.
[1/4] Resolving packages...
error Couldn't find package "ag-grid" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

This is pointing to an internal repository. Why is this not working?

Vlad Schnakovszki
  • 8,434
  • 6
  • 80
  • 114

1 Answers1

3

After trying various things and going through way too many Google pages, I've figured it out.

The problem was that I was setting the following in .npmrc:

registry=https://internal-repo.com/some-path

while it required a trailing slash:

registry=https://internal-repo.com/some-path/
Vlad Schnakovszki
  • 8,434
  • 6
  • 80
  • 114