I had a build that had worked as recently as March 1. With some new code it the EAS portion of the build failed.
I am on Expo 47.
One of the checks we did was to rerun the previous build and we’re getting it to error out.
Just in case we’re missing something because I had locked the version of EAS-CLI to 0.55.1 in my local branch I have installed node 16.19.1 (this ensures I have an empty global packages) I installed the latest yarn (classic) and eas-cli only (no local plugin as @wodin had indicated before). not even expo-cli
eas --version
eas-cli/3.8.1 darwin-x64 node-v16.19.1
This is only failing on the macOS build for iOS but not the Android build that’s running in ubuntu.
Here’s where I think the relevant logs are
[PREBUILD] yarn run v1.22.19
[PREBUILD] $ /private/var/folders/r_/xdpjhyys6pxc3_nj8dltjwhc0000gn/T/eas-build-local-nodejs/86e1280a-3882-4a3c-a7b6-30e2cca8a3b8/build/node_modules/.bin/expo prebuild --no-install --platform ios
[PREBUILD] - Creating native project directories (./ios and ./android) and updating .gitignore
[PREBUILD] Unexpected end of JSON input
[PREBUILD] - Creating native project directories (./ios and ./android) and updating .gitignore
[PREBUILD] ✖ Failed to create the native project.
[PREBUILD] You may want to delete the `./ios` and/or `./android` directories before trying again.
[PREBUILD] Done in 3.18s.
[PREBUILD] Running "yarn install" in the root dir of your repository
[PREBUILD] yarn install v1.22.19
[PREBUILD] [1/4] Resolving packages...
[PREBUILD] success Already up-to-date.
[PREBUILD] $ husky install || true
[PREBUILD] fatal: not a git repository (or any of the parent directories): .git
[PREBUILD] husky - git command not found, skipping install
[PREBUILD] Done in 0.90s.
[INSTALL_PODS]
Error: spawn pod ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19)
at onErrorNT (node:internal/child_process:485:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
With DEBUG=* I see it is hitting my private repo proxy
[PREBUILD] $ /private/var/folders/r_/xdpjhyys6pxc3_nj8dltjwhc0000gn/T/eas-build-local-nodejs/87d28345-d20c-4bed-8192-52ce257167b6/build/node_modules/.bin/expo prebuild --no-install --platform ios
[PREBUILD] - Creating native project directories (./ios and ./android) and updating .gitignore
[PREBUILD] 2023-03-16T18:57:17.163Z expo:utils:npm Run: npm view expo-template-bare-minimum@sdk-47 dist.tarball --json
[PREBUILD] 2023-03-16T18:57:17.164Z expo:utils:npm Fetch from URL: https://repo.xxxxx.com/repository/npm/expo-template-bare-minimum/-/expo-template-bare-minimum-47.0.22.tgz
[PREBUILD] 2023-03-16T18:57:17.168Z expo:api:fetch:base fetch: https://repo.xxxxx.com/repository/npm/expo-template-bare-minimum/-/expo-template-bare-minimum-47.0.22.tgz
[PREBUILD] Unexpected end of JSON input
I have verified that I can get data a valid TGZ file using the same credentials and the errors never said 401.
Since we know it’s sending the wrong data to the nexus server to get the minimal template. We temprorariiy removed the registry= setting in the project .npmrc, but that’s not ideal as it is pulling deps we don’t control.
I think what should happen is that the retrieval of the minimal template should be done with just npm and not this faked one
Another temporary work around I did was allow anonymous access to just the templates folder
expo-minimal-template:
# This service is to workaround for https://github.com/expo/expo/issues/21740
# This will route to npmjs for only this path
image: openrelay/proxypass
environment:
PROXY_TARGET: https://registry.npmjs.com
networks:
- traefik
deploy:
placement:
constraints:
- node.role != manager
replicas: 2
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik"
- "traefik.main.frontend.rule=Host:repo.xxxxx.com; Method: GET; PathPrefix:/repository/npm/expo-template-bare-minimum; ReplacePathRegex: ^/repository/npm/(.*) /$$1"
- "traefik.main.port=80"