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

Pin node to version 22.11 #5582

Merged
merged 2 commits into from
Dec 8, 2024

Conversation

browniebroke
Copy link
Member

@browniebroke browniebroke commented Dec 8, 2024

Description

Ou CI broke a few days ago, the Docker Gulp job started failign on all branches with ERR_REQUIRE_ASYNC_MODULE.

We specify only the major node version, but the latest v22.12 introduced a change which is impacting us, or at least one of our dependency:

With this feature enabled, Node.js will no longer throw ERR_REQUIRE_ESM if require() is used to load a ES module. It can, however, throw ERR_REQUIRE_ASYNC_MODULE if the ES module being loaded or its dependencies contain top-level await. When the ES module is loaded successfully by require(), the returned object will either be a ES module namespace object similar to what's returned by import(), or what gets exported as "module.exports" in the ES module.

The root cause is from gulp-imagemin which is doing a top-level await:

Checklist:

  • I've made sure that tests are updated accordingly (especially if adding or updating a template option)
  • I've updated the documentation or confirm that my change doesn't require any updates

Rationale

Pinning the version to fix our CI until the dependency is fixed or we figure out a better way to fix it.

@browniebroke browniebroke marked this pull request as ready for review December 8, 2024 12:30
@browniebroke browniebroke merged commit b25ab14 into cookiecutter:master Dec 8, 2024
14 checks passed
@browniebroke browniebroke deleted the fix/pin-node-22.11 branch December 8, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant