Prebuild error 'Something went wrong installing JavaScript dependencies'

✔ Updated package.json and added index.js entry point for iOS and Android
[13:47:41] 🧶 Using Yarn to install packages. Pass --npm to use npm instead.
- Installing JavaScript dependencies
✖ Something went wrong installing JavaScript dependencies, check your yarn logfile or run yarn install again manually.

I have been running eas build regularly attempting to get a successful submission to the app store after troubleshooting some configurations for associated domains in my app.config.ts

Yesterday I using eas build to consistently push successful builds to eas. Today I used a github work flow to submit a new build with no code changes and recieved the quoted error.
"
I have tried
deleteing nodemodules
npm i

npm cache clean --force
npm cache verify
npm -g uninstall eas --save
npm install eas --g

Accompanying eas build --npm returns an error

I have been debugging my app store submission for the last day or so which was failing due to accessing an asc api key but I thought I had sorted out my build issues.

Very appreciative of any help. Thanks!

  • managed workflow
  • eas-cli/0.48.2

I’m encountering the same issue. Working fine a few days ago and now failing even though there are no code changes.

I am still searching for a solution. I will post it when I find one.

1 Like

If I run expo prebuild --npm locally it uses npm and installs the dependencies and correctly builds again! If I choose to use my github workflow the error arises again. Looking for how to correctly add the --npm flag to the prebuildCommand key to use the npm flag. Not sure what the key of this object should be if this error is communicating correctly.

eas.json is not valid [ValidationError: "build.prebuildCommmand" must be of type object]

Having the same issue. Tried adding the prebuildCommand as follows:

{ build: { myProfileName: { prebuildCommand: "prebuild --npm" } } }

Got the following error:

Error: eas.json is not valid [ValidationError:  "build.myProfileName.prebuildCommand" is not allowed. 
1 Like

Updating to eas-cli version 0.48.2 fixed the eas.json validation error and now the build works fine using npm.

Updating my eas.json cli version 0.48.2 also fixed my error. Thanks @oanacioara

Hi @williamjones

The log indicates that the build server is using yarn, but you’re actually using npm to install your dependencies. This would happen if you have not checked in your package-lock.json file or have added it to your .gitignore or .easignore file.

I’m glad you managed to get past the problem, but you should rather check in the package-lock.json (or yarn.lock if you use yarn) because then you know the build server is using the exact same dependency versions are you are using while developing the app.

1 Like

Thanks @wodin will do.

1 Like

I am already doing this and I still had the error.

There was a regression on eas build side, where prebuild on eas started defaulting to yarn. Currently, issue should be fixed.

@oanacioara I recommend removing prebuildCommand if you don’t need it, currently you are missing --non-interactive flag and --platform, so it might cause issues in the future

2 Likes

Thank you!

I am able to successfully build after changing the cli version to 0.48.2 with the prebuild command.

Running locally I can remove the prebuild command and I get the same successful behavior but If I run my github workflow with the prebuild command removed my build succeeds but my app store submission doesnt start as it was prior with the -auto-submit flag

Running with prebuild command and version update are the allowing for a successful build and submission via github workflow

@wodin @wkozyra

but If I run my github workflow with the prebuild command removed my build succeeds but my app store submission doesnt start as it was prior with the -auto-submit flag

I just checked all your builds from past few hours and each of them has the submissions, only one submission succeded, but failures seem to be correct (uploading the same version more than once, invalid app-specific password)

Thanks for checking @wkozyra . I checked back over my action runs and the builds vs submissions you are right. Earlier I thought I had run a workflow that never showed up.