Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Npm install failing in Github Actions #7188

Closed
timwright12 opened this issue Nov 2, 2023 · 4 comments
Closed

Npm install failing in Github Actions #7188

timwright12 opened this issue Nov 2, 2023 · 4 comments
Assignees
Labels
devops front-end Ticket requires front-end work

Comments

@timwright12
Copy link
Contributor

We're getting npm install failures in the iOS and Android builds recently that are forcing reruns of the workflows.

The error:

error An unexpected error occurred: "/home/runner/work/va-mobile-app/va-mobile-app/VAMobile/node_modules/core-js: Cannot read properties of undefined (reading 'config')".

We can get it to pass if we keep trying, but that's not a great solution

@timwright12 timwright12 added the front-end Ticket requires front-end work label Nov 2, 2023
@dumathane dumathane added the Post Planning Add Tickets that are being added to the sprint that were not part of sprint planning label Nov 2, 2023
@timwright12
Copy link
Contributor Author

@theodur theodur added the devops label Nov 2, 2023
@theodur
Copy link
Contributor

theodur commented Nov 7, 2023

After looking into the failures, it seems to be caused by different reasons, because an error I've been seeing a lot lately is:

info This package requires node-gyp, which is not currently installed. Yarn will attempt to automatically install it. If this fails, you can run "yarn global add node-gyp" to manually install it.
error An unexpected error occurred: "/home/runner/work/va-mobile-app/va-mobile-app/VAMobile/node_modules/core-js: Cannot read properties of undefined (reading 'getOption')".

Doing some research into the error above, it looks like npm removed the node-gyp binary which is causing this issue intermittently because yarn tries to install it. The breaking change has been reverted in npm, and should be available in the next npm release (issue).

After looking into the other error:

error An unexpected error occurred: "/home/runner/work/va-mobile-app/va-mobile-app/VAMobile/node_modules/core-js: Cannot read properties of undefined (reading 'config')".

It seems like this is also cause by the node-gyp binary being removed (older similar issue).

Since the node-gyp binary is going to be added back soon, in the meantime I opened a PR adding retries for the yarn install steps. Once the binary is added back and released in npm, we may not need the retires anymore, but it can't hurt to keep them.

@timwright12
Copy link
Contributor Author

@theodur thats awesome, thank you!

@TKDickson TKDickson removed the Post Planning Add Tickets that are being added to the sprint that were not part of sprint planning label Nov 8, 2023
@theodur
Copy link
Contributor

theodur commented Nov 8, 2023

PR for this has been merged, closing this one out ✅

@theodur theodur closed this as completed Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops front-end Ticket requires front-end work
Projects
None yet
Development

No branches or pull requests

4 participants