lerna receiving incorrect --registry
option (.npmrc isn't merged)
#2487
Labels
bug
Something isn't working
--registry
option (.npmrc isn't merged)
#2487
Describe the bug
i have a project
.npmrc
file that does not contain the registry. i then useactions/setup-node@v3
in my github actions to specify theregistry-url
before executingauto shipit
. this configures npm by creating a temp global.npmrc
file and sets theNPM_CONFIG_USERCONFIG
env var with its path. however, this global config is not being merged with my project config when runningauto shipit
, so lerna does not pickup the registry correctly.i'm doing this so that i can swap the registry for canary (gh registry) vs production (npm registry) releases during CI. afaik,
.npmrc
file resolution checks for files at the location in that env var, and merges the global/local configs:given this, i expected the config that
auto
eventually receives to have the correct registry.To Reproduce
this is working as expected in one of my projects. the
REGISTRY_URL
env var is passed to thesetup-node
workflow in./.github/actions/setup-repo
and publishes correctly.i copy/pasted that project setup to a new project (with upgraded versions of lerna and auto) but now the same approach does not work:
.npmrc
file without a registryactions/setup-node@v3
to point theregistry-url
tohttps://npm.pkg.github.com
auto shipit
Expected behavior
the configs would be merged so
lerna
receives the correct registryScreenshots
(shown above)
Environment information:
Additional context
N/A
The text was updated successfully, but these errors were encountered: