Skip to content

Build the OWA natively on Apple Silicon: Node 22.20.0, frontend-maven-plugin 1.15.4 - #120

Merged
dkayiwa merged 1 commit into
openmrs:core-3.xfrom
dkayiwa:core-3.x-arm64-node
Oct 13, 2026
Merged

dkayiwa merged 1 commit into
openmrs:core-3.xfrom
dkayiwa:core-3.x-arm64-node

Conversation

@dkayiwa

@dkayiwa dkayiwa commented Oct 13, 2026

Copy link
Copy Markdown
Member

On an arm64 Mac, mvn package fails in bedmanagement-owa:

[INFO] Downloading https://nodejs.org/dist/v14.7.0/node-v14.7.0-darwin-arm64.tar.gz
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-yarn
        (install node and yarn) on project bedmanagement-owa: Could not download Node.js: Got error code 404

frontend-maven-plugin 1.6 maps aarch64 to darwin-arm64, but Node 14.7.0 was never published for
darwin-arm64. Node only ships darwin-arm64 builds from v16 onwards. Until now, the only way to build was
-Dskip.installnodenpm -Dskip.installyarn -Dskip.yarn -Dskip.npm. That produces an omod whose
bedmanagement.owa has no build/app.js or build/vendor.js.

Change (owa/pom.xml only)

  • Node v14.7.0 -> v22.20.0: the current LTS, and the version coreapps moved to in openmrs-module-coreapps#522.
    It is published for both darwin-arm64 and linux-x64.
  • frontend-maven-plugin 1.6 -> 1.15.4, the last 1.x release (requires Maven 3.6+). Since 1.12 the plugin fetches
    the native arm64 Node build for Node 16+ on Apple Silicon, instead of the x64 build under Rosetta.
  • yarn stays at v1.3.2. yarn.lock, package.json and webpack 3 / babel 6 / jest 21 are unchanged.
    None of them is a native addon, and there is no node-sass.

Verified

  • macOS arm64, Java 21, scratch local repository: mvn clean package succeeds. The plugin downloads
    node-v22.20.0-darwin-arm64.tar.gz, and all 56 OWA jest tests pass.
  • The omod's web/module/owas/bedmanagement.owa contains build/app.js and build/vendor.js.
  • Node 16.20.2 and Node 22.20.0 produce byte-identical app/build output.
  • The OWA also builds, and its tests pass, in a linux/amd64 node:22.20.0 container, which matches the ubuntu CI runner.

The same change applies to master, whose owa/pom.xml pins the same plugin and Node versions.

🤖 Generated with Claude Code

…-plugin 1.15.4

frontend-maven-plugin 1.6 requests node-v14.7.0-darwin-arm64.tar.gz on an
arm64 Mac, which Node never published (darwin-arm64 builds start at v16), so
`mvn package` failed with a 404 in bedmanagement-owa unless the frontend build
was skipped, leaving the omod's OWA without build/app.js and build/vendor.js.

Move to Node v22.20.0 (current LTS, the version coreapps uses), published for
darwin-arm64 and linux-x64, and to frontend-maven-plugin 1.15.4, which fetches
the native arm64 Node for Node 16+. The OWA toolchain (webpack 3, babel 6,
jest 21, yarn 1.3.2) is unchanged and builds the same bundles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

This comment has been minimized.

@sonarqubecloud

Copy link
Copy Markdown

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High impact] The PR appears safe to merge.

Summary

No actionable issues found.

  • Maven builds the OWA with Node 22.20.0 and a newer plugin.

Reviews (1) · Last reviewed commit: "Build the OWA natively on Apple Silicon:..." · Reviewed by Greptile

@dkayiwa
dkayiwa merged commit 7a5c64c into openmrs:core-3.x Oct 13, 2026
7 of 9 checks passed
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

Successfully merging this pull request may close these issues.

1 participant