Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

fix(nix): ship every top-level api module in the opengym-api package

gerrydoro666ddca7bd98
diff --git a/nix/api.nix b/nix/api.nix
index 167332dff..0de411efe 100644
--- a/nix/api.nix
+++ b/nix/api.nix
@@ -27,7 +27,11 @@ buildNpmPackage rec {
mkdir -p $out/lib/opengym-api
cp -r node_modules $out/lib/opengym-api/
cp -r coach $out/lib/opengym-api/
- cp server.js push-messages.js verify-error.js $out/lib/opengym-api/
+ # Every top-level module server.js imports: server.js, password.js, passkeys-store.js,
+ # rate-limit.js, media.js, device-link.js, push-messages.js, verify-error.js. Copy the
+ # glob rather than an explicit list — a hand-kept list silently ships an incomplete tree
+ # and the failure only shows up as ERR_MODULE_NOT_FOUND in the systemd journal.
+ cp ./*.js $out/lib/opengym-api/
mkdir -p $out/bin
makeWrapper ${nodejs_22}/bin/node $out/bin/opengym-api \