Skip to content

Dockerfile is missing patches directory causing postinstall script to fail #924

@ADchampion3

Description

@ADchampion3

Bug Description

The Dockerfile in the root directory fails during yarn install because the postinstall.cjs script tries to require the ../patches/fix-pglite-prisma-bytes.cjs file, but the patches directory is not copied into the Docker container.

Error Message

[4/4] Building fresh packages...
$ node ./scripts/postinstall.cjs
node:internal/modules/cjs/loader:1210
throw err;
^

Error: Cannot find module '../patches/fix-pglite-prisma-bytes.cjs'
Require stack:
- /repo/scripts/postinstall.cjs
at Module._resolveFilename (node:internal/modules/cjs/loader:1207:15)
at Module._load (node:internal/modules/cjs/loader:1038:27)
at Module.require (node:internal/modules/cjs/loader:1289:19)
at require (node:internal/modules/helpers:182:18)
at Object.<anonymous> (/repo/scripts/postinstall.cjs:4:1)
at Module._compile (node:internal/modules/cjs/loader:1521:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1623:10)
at Module.load (node:internal/modules/cjs/loader:1266:32)
at Module._load (node:internal/modules/cjs/loader:1091:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:164:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/repo/scripts/postinstall.cjs' ]
}

Steps to Reproduce

  1. Clone the repository
  2. Run docker build -t happy-latest .
  3. Build fails during the deps stage

Root Cause

In scripts/postinstall.cjs line 4:

require('../patches/fix-pglite-prisma-bytes.cjs');
But the Dockerfile (line 11-12) only copies:
dockerfile
COPY package.json yarn.lock ./
COPY scripts ./scripts

The patches directory is not included.

Suggested Fix

Add the following line to the Dockerfile after line 12:

dockerfile
COPY patches ./patches

Additional Question: How to become a contributor?

I noticed this project uses a monorepo structure with workspaces. I would love to contribute fixes and improvements to this project.

What's the process for becoming a contributor?
Are there any specific guidelines for PR submissions?
Is there a Discord or community channel where contributors coordinate?
Thank you for building this awesome tool! 🔥

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions