Fix ERR_REQUIRE_ESM crash-loop: bump base image Alpine 3.19 -> 3.22 (…#84
Merged
Merged
Conversation
…addon 1.2.4.1) - build.yaml: base image Alpine 3.19 (Node 20.15.1) -> 3.22 (Node 22.16). Upstream v1.2.4 added jose v6 (ESM-only), require()'d at startup in backend/modules/oidc/service.js; require(esm) needs Node >= 20.19 or >= 22.12. - config.yaml: version 1.2.4 -> 1.2.4.1 - CHANGELOG.md: add 1.2.4.1 entry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the startup crash-loop in addon 1.2.4: upstream tududi v1.2.4 added
josev6 (ESM-only), which isrequire()'d at startup — this needs Node ≥ 20.19 / ≥ 22.12, but the Alpine 3.19 base image ships Node 20.15.1. Bumps the base image to Alpine 3.22 (Node 22.16, matching upstream'snode:22-alpine).Type of Change
Changes Made
tududi-addon-dev/build.yaml: base image Alpine 3.19 → 3.22 (both arches). 3.19 is EOL and no longer rebuilt by HA docker-base (currently built: 3.22/3.23/3.24); its Node 20.15.1 cannotrequire()the ESM-onlyjosev6 added in upstream v1.2.4.tududi-addon-dev/config.yaml: version1.2.4→1.2.4.1(addon-level patch, still wraps tududi v1.2.4).tududi-addon-dev/CHANGELOG.md: new1.2.4.1entry.Testing
Add-on Affected
tududi-addon-dev)tududi-addon)Checklist
Screenshots (if applicable)
Additional Notes
Error [ERR_REQUIRE_ESM]: require() of ES Module /app/node_modules/jose/dist/webapi/index.js from /app/backend/modules/oidc/service.js— hit regardless of OIDC configuration.chrisvel/tududi@v1.2.4(jose ^6.0.0in package.json); v1.1.0-dev.14 had nojosedependency, which is why the previous image worked. Upstream usesnode:22-alpine, so they never see this.devto publishghcr.io/c2gl/tududi-addon-dev:1.2.4.1.