Backend crash: jsdom module not found in production container #1

Open
opened 2026-05-29 23:46:08 +00:00 by kaykayyali · 0 comments
Owner

Problem

restitution-backend-1 exits with code 1:

Error: Cannot find module 'jsdom'

Root Cause

jsdom is listed in devDependencies (package.json line 54), but the backend uses it at runtime for authoritative server simulation (running Phaser inside JSDOM). The Dockerfile production stage runs npm install --production --omit=dev, which strips devDependencies.

Fix

In package.json, move "jsdom": "^20.0.2" from devDependenciesdependencies.

Dependencies

  • Blocks: e2e smoke test (smoke test needs a running backend)
  • Blocked by: None
## Problem `restitution-backend-1` exits with code 1: ``` Error: Cannot find module 'jsdom' ``` ## Root Cause `jsdom` is listed in `devDependencies` (package.json line 54), but the backend uses it at runtime for authoritative server simulation (running Phaser inside JSDOM). The Dockerfile production stage runs `npm install --production --omit=dev`, which strips devDependencies. ## Fix In `package.json`, move `"jsdom": "^20.0.2"` from `devDependencies` → `dependencies`. ## Dependencies - Blocks: e2e smoke test (smoke test needs a running backend) - Blocked by: None
kaykayyali added the bugblocker labels 2026-05-29 23:46:08 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kaykayyali/restitution#1