Compare commits

...
1 Commits
3 changed files with 8 additions and 1 deletions

No files matched your search

@@ -51,6 +51,10 @@ export async function installDependenciesAsync({
'--production',
'false',
];
// Yarn Classic doesn't respect NPM_CONFIG_REGISTRY, so pass --registry flag
if (env['EAS_BUILD_NPM_CACHE_URL']) {
args.push('--registry', env['EAS_BUILD_NPM_CACHE_URL']);
}
}
break;
}
@@ -1,3 +1,2 @@
export const NpmrcTemplate = `//registry.npmjs.org/:_authToken=\${NPM_TOKEN}
registry=https://registry.npmjs.org/
`;
+4
View File
@@ -41,6 +41,10 @@ export function getBuildEnv({
setEnv(env, 'NPM_CACHE_URL', config.npmCacheUrl);
setEnv(env, 'NVM_NODEJS_ORG_MIRROR', config.nodeJsCacheUrl);
setEnv(env, 'EAS_BUILD_NPM_CACHE_URL', config.npmCacheUrl);
// Force npm/pnpm/bun to use cache registry (overrides .npmrc files)
setEnv(env, 'NPM_CONFIG_REGISTRY', config.npmCacheUrl);
// Force Yarn Berry to use cache registry (overrides .yarnrc.yml files)
setEnv(env, 'YARN_NPM_REGISTRY_SERVER', config.npmCacheUrl);
setEnv(env, 'EAS_BUILD_PROFILE', metadata.buildProfile);
setEnv(env, 'EAS_BUILD_GIT_COMMIT_HASH', metadata.gitCommitHash);
setEnv(env, 'EAS_BUILD_ID', buildId);