Closed benmajor closed 2 years ago
So, it turns out that the build was failing because I was requiring a package via NPM using git://
. Changing the URL to use HTTPS instead has solved the issue.
I had to use a specific commit from the RevnueCat RN package for iOS, and this was the only way to do it. It would appear that the build devices don't have a Git client installed.
node_modules
to the repository?Sorry, I deleted the build during some house-keeping.
It turns out that this issue is actually related to a committed package-lock.json
file, the following entry was causing the entire Node build to fail:
"node_modules/react-native-purchases": {
"version": "4.5.0",
"resolved": "git+ssh://git@github.com/RevenueCat/react-native-purchases.git#75e3c5a99430168fac3a2a28c17238408580fcb3",
"integrity": "sha512-xgpanBklxTsrFci82Jifn40Hn39dwG4RsqgR8jCXqmMBVnpeUuFJBrj+PrdJWKw3YIWiejqxJbK8IYhGaHGOdQ==",
"hasInstallScript": true,
"license": "MIT",
"peerDependencies": {
"react": ">= 16.6.3",
"react-native": ">= 0.58.2"
}
}
Which was generated from this line in packages.json
:
"react-native-purchases": "github:RevenueCat/react-native-purchases#75e3c5a99430168fac3a2a28c17238408580fcb3",
It would appear as though the EAS platform does not like the github:
protocol. Switching the requirement out as follows (and rebuilding package-lock.json
) resolved the issue:
"react-native-purchases": "https://github.com/RevenueCat/react-native-purchases.git#75e3c5a99430168fac3a2a28c17238408580fcb3"
I'm not sure whether this is actually considered a bug now that I have got to the bottom of the issue, but it seems there are a few people having similar issues (see here).
Using github:
(or git+ssh://
) links require an SSH token, that is not configured by default (as it's linked to your github account). It could probably be made to work by setting one as a secret, and running a script to write it to a file, and set the GIT_SSH_COMMAND env var to point to that ssh key.
There has been quite some backlash on the breaking change in NPM that causes github links to be saved as git+ssh in the lock file, for reference: https://github.com/npm/cli/issues/2610.
Yeah, that would explain it. It's not the end of the world to be honest, just a bit of a gotcha. Thanks for the input, I'll go ahead and close the issue :)
Build/Submit details page URL
https://expo.dev/accounts/kolekto/projects/kolekto/builds/795afbb2-f330-4b78-87b9-b1b8db90ea3c
Summary
Is there a problem with the build platform? Whenever I try to create a build using
eas build --platform ios
, I get a ton of errors telling me that there's a problem finding files in thenode_modules
dir.Managed or bare?
Managed
Environment
Error output
(Log file is a lot longer than this).
Reproducible demo or steps to reproduce from a blank project
eas build --platform ios