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

why didn't a yarn error trigger a failure in GitHub Actions? node version mismatch #1705

Open
jywarren opened this issue May 19, 2022 · 6 comments

Comments

@jywarren
Copy link
Member

jywarren commented May 19, 2022

Originally posted by @jywarren in #1688 (comment)

UPDATE: it's because of a node version mismatch between GitHub Actions and Jenkins and Google Cloud

We saw this error in a Jenkins build, and yet on its own it did not trigger a GitHub Actions failure:

�[33mweb_1  |�[0m yarn install v1.22.17
�[33mweb_1  |�[0m [1/5] Validating package.json...
�[33mweb_1  |�[0m [2/5] Resolving packages...
�[33mweb_1  |�[0m [3/5] Fetching packages...
�[33mweb_1  |�[0m warning Pattern ["jquery@jquery/jquery-dist#^3.6.0"] is trying to unpack in the same destination "/usr/local/share/.cache/yarn/v6/npm-jquery-3.6.0/node_modules/jquery" as pattern ["jquery@^3.3.1","jquery@>=1.10","jquery@>=1.8","jquery@^3.3.1","jquery@^3.2.1","jquery@^3.3.1"]. This could result in non-deterministic behavior, skipping.
�[33mweb_1  |�[0m warning [email protected]: The engine "browsers" appears to be invalid.
�[33mweb_1  |�[0m error [email protected]: The engine "node" is incompatible with this module. Expected version ">= 13.0.0". Got "12.22.7"
�[33mweb_1  |�[0m error Found incompatible module.
�[33mweb_1  |�[0m info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
@jywarren
Copy link
Member Author

When comparing the same or similar code (i believe, this was hours earlier than the above error, and merged), we saw no such error. But i think that's because default node version on GitHub Actions was higher than v13?

https://github.com/publiclab/mapknitter/runs/6374206383?check_suite_focus=true

The yarn error above was: error [email protected]: The engine "node" is incompatible with this module. Expected version ">= 13.0.0". Got "12.22.7"

Do we need to do more to sync node versions?

@jywarren
Copy link
Member Author

Yes, GitHub Actions uses at least node v16! https://github.blog/changelog/2021-12-10-github-actions-github-hosted-runners-now-run-node-js-16-by-default/

and indeed we just switched to v16 to fix this issue, as it's a LTS version. Should we fix this?

@jywarren jywarren changed the title why didn't a yarn error trigger a build failure in CI? why didn't a yarn error trigger a build failure in CI? node version mismatch May 19, 2022
@jywarren
Copy link
Member Author

Note that Jenkins doesn't run the tests. And Google Cloud is yet another environment, although it will probably use the same files in dockerfiles/development and dockerfiles/production that we changed to upgrade to node v16: #1694

@jywarren jywarren changed the title why didn't a yarn error trigger a build failure in CI? node version mismatch why didn't a yarn error trigger a failure in GitHub Actions? node version mismatch May 19, 2022
@jywarren
Copy link
Member Author

there is dockerfile support for GH Actions, makes sense... we could converge a bit... but is it worth it? https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions

@jywarren
Copy link
Member Author

jywarren commented May 26, 2022

Noting that we had a similar error of node v12 on production when we tried to publish the #1712 changes, somehow it's not v16 on production again...?

error [email protected]: The engine "node" is incompatible with this module. Expected version ">= 13.0.0". Got "12.22.5"

@jywarren
Copy link
Member Author

Will try setting this here:

"node": ">=10.0.0"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant