Eas build can't find scoped private package that's in the github registry. How to set the registry for a scope?

Please provide the following:

  1. SDK Version: 4.1.2
  2. Platforms(Android/iOS/web/all): all
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

Hi, I’m trying to build my app using eas build --local, and I’m getting an error saying a private package is not found. Our private package is in the github registry https://npm.pkg.github.com/ and is scoped. We have a yarnrc file that has this npmscope config for installing it directly, but I don’t know how to configure eas build to use this registry URL for this scoped private package.

I’ve tried setting an npmrc following this guide Use private npm packages - Expo Documentation but I get told that it’s being ignored.
npm WARN ignoring workspace config at /Users/jinchoi/Documents/Spoton/digital-ordering/apps/expo/.npmrc

The npmrc

//registry.npmjs.org/:_authToken=${NPM_TOKEN}
@ourscopedname:registry=https://npm.pkg.github.com/

Any help would be greatly appreciated!

this might be helpful: [BUG] npm WARN ignoring workspace config at /my-project/my-workspace/.npmrc · Issue #4605 · npm/cli · GitHub

1 Like

You have configure EAS Build to use your scoped private package hosted on GitHub’s npm registry, you can create a .npmrc file in your project’s root directory. Ensure that you have set your GitHub token (NPM_TOKEN) as a secret in your EAS account. YourTexasBenefits
In your .npmrc file:
@ourscopedname:registry=https://npm.pkg.github.com/ //npm.pkg.github.com/:_authToken=${NPM_TOKEN}

1 Like

Thanks! I had the .npmrc in the nested directory that has our expo package which didn’t work.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.