-
-
Notifications
You must be signed in to change notification settings - Fork 311
Closed
Description
The problem
When using private registry with authorization required (e.g. Nexus or verdaccio), it's impossible to use patch-package, when using per-project auth
The reason is that patch-package tries to install package in temp folder, but since there's no .npmrc
file with auth token - 401 error is thrown:
npm ERR! code E401
Note, that when using private registries, all the packages from NPM registry are usually proxied. Installing any of them requires user to be authorized.
Potential solution
I've managed to make it work locally by copying .npmrc
file to the tmp repo.
My suggestion is to check if .npmrc
file exists and copy it to temp repo. Also, maybe it's worth to consider copying .yarnrc
as well
I can submit a PR :)
Metadata
Metadata
Assignees
Labels
No labels