Cause 1 of 5
Dependencies were never installed, or node_modules is out of date.
Run npm install locally, or npm ci in CI and after switching branches — npm ci installs exactly the lockfile and is reproducible. Then confirm the package is listed in package.json rather than only present by accident.
Cause 2 of 5
The package is in devDependencies but the environment installed production only.
npm ci --omit=dev and NODE_ENV=production npm install both skip devDependencies. If the module is needed at runtime, move it into dependencies — that is the fix, not reinstalling with dev dependencies in production.
Cause 3 of 5
The specifier is missing its ./ prefix.
require('utils') searches node_modules for a package called utils; require('./utils') looks beside the current file. One character decides which.
Cause 4 of 5
The build output is missing from the image.
Check that dist/ actually contains the compiled file and that the Dockerfile copies it. Building before npm ci, or copying source over the build output in a later layer, produces exactly this error at boot.
Cause 5 of 5
The case of the path does not match the file.
This passes on macOS and Windows and fails on Linux. Rename the require to match the file byte for byte; git mv the file if the repository itself has the wrong case, since a plain rename on a case-insensitive filesystem is not recorded.