eas-cli: 3rd party NPM store suddenly fails on expo prebuild Android
Build/Submit details page URL
https://expo.dev/accounts/ntimhe/projects/fm-tasks/builds/f8af6b6a-e63c-40ba-993b-50acab67b712
Summary
Our Android builds suddenly fails in prebuild step. I’ve tried building both with our CI and a preview build
We have for a long time used azure artifacts as our package repository, and our azure artifacts store upstream npmjs.com
This is our .npmrc file:
//pkgs.dev.azure.com/ntidevel/MDOCFM/_packaging/FM.Mobile.Common/npm/registry/:username=VssSessionToken
//pkgs.dev.azure.com/ntidevel/MDOCFM/_packaging/FM.Mobile.Common/npm/registry/:_password=personal_access_token
//pkgs.dev.azure.com/ntidevel/MDOCFM/_packaging/FM.Mobile.Common/npm/registry/:email=not-used@example.com
registry=https://pkgs.dev.azure.com/ntidevel/MDOCFM/_packaging/FM.Mobile.Common/npm/registry
always-auth=true
The installation step works. It should only work if the .npmrc file is correctly setup. Has something changed in prebuild step since 10th of Jan 2022, where we had our last successful build?
Managed or bare?
Managed
Environment
EAS CLI 0.44.1 environment info: System: OS: Windows 10 10.0.19043 Binaries: Node: 16.13.2 - C:\Program Files\nodejs\node.EXE Yarn: 1.21.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 8.1.2 - C:\Program Files\nodejs\npm.CMD Utilities: Git: 2.34.1. - /mingw64/bin/git npmPackages: expo: 43.0.0 => 43.0.0 expo-updates: 0.10.15 => 0.10.15 react: 17.0.1 => 17.0.1 react-dom: 17.0.1 => 17.0.1 react-native: 0.64.3 => 0.64.3 Project workflow: managed
Error output
Unexpected response: Unauthorized. From url: https://pkgs.dev.azure.com/ntidevel/MDOCFM/_packaging/FM.Mobile.Common/npm/registry/expo-template-bare-minimum/-/expo-template-bare-minimum-43.0.13.tgz
Reproducible demo or steps to reproduce from a blank project
- Setup npm with azure artificats
- Setup npmjs.com as upstream source
- publish a package to azure, e.g.
my-packageat version 1.0.0. - Create a new expo project
- use the package in package.json,
"my-package": "1.0.0", - setup .npmrc file (replace personal_access_token with your token)
//pkgs.dev.azure.com/ntidevel/MDOCFM/_packaging/FM.Mobile.Common/npm/registry/:username=VssSessionToken
//pkgs.dev.azure.com/ntidevel/MDOCFM/_packaging/FM.Mobile.Common/npm/registry/:_password=personal_access_token
//pkgs.dev.azure.com/ntidevel/MDOCFM/_packaging/FM.Mobile.Common/npm/registry/:email=not-used@example.com
registry=https://pkgs.dev.azure.com/ntidevel/MDOCFM/_packaging/FM.Mobile.Common/npm/registry
always-auth=true
- create a preview build with eas.json
"preview": {
"android": {
"buildType": "apk",
},
"releaseChannel": "preview"
}
- run
eas build --platform android --profile=preview
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 24 (8 by maintainers)
it’s an EAS issue but you can still make it work if you use your private registry only for scoped packages
Thank you for your quick reply!
Great idea with docker. Didn’t think of that at all. It works (i still think we would fail at the install dependencies step, before prebuild, if we had an error with .npmrc file):
Last successfull build using upstream approach
The issue still stands with 3rd party NPM repo that upstreams npmjs.com. But I think we will be using scoped moving forward:
In package.json
"@ntidevel/fm-mobile-common": "1.0.0",successfull build today using scoped approach instead of upstream