corepack icon indicating copy to clipboard operation
corepack copied to clipboard

Feature request: `COREPACK_NPM_REGISTRY ` defaults to `$(npm config get registry)`

Open zanminkian opened this issue 1 year ago • 9 comments

Currently, the default value of COREPACK_NPM_REGISTRY is https://registry.npmjs.org. My npm registry has been changed to another one, while corepack is still using https://registry.npmjs.org.

Setting up COREPACK_NPM_REGISTRY value to follow $(npm config get registry) (the configed npm registry) is convenient, so that I don't need to concern the registry of corepack

zanminkian avatar Jul 19 '24 04:07 zanminkian

Same issue!!! 🫰 / Although now the environment variable(process.env.COREPACK_NPM_REGISTRY) has a higher priority.

zyyv avatar Jul 19 '24 09:07 zyyv

same, how to reslove it

chenleicode avatar Aug 01 '24 07:08 chenleicode

same, how to reslove it

Set env variable: export COREPACK_NPM_REGISTRY=https://registry.npmmirror.com

zyyv avatar Aug 01 '24 07:08 zyyv

Thank you

chenleicode avatar Aug 02 '24 09:08 chenleicode

@chenlei0608 To use the same registry as npm, add export COREPACK_NPM_REGISTRY=$(npm config get registry) at the end of your .zshrc or .bashrc.

zanminkian avatar Aug 18 '24 17:08 zanminkian

Thanks

chenleicode avatar Aug 19 '24 01:08 chenleicode