Make Docker pnpm install resilient to sharp ignored-builds; drop
Docker / build (push) Successful in 1m26s
Docker / build (push) Successful in 1m26s
unreachable gha cache
This commit is contained in:
@@ -112,6 +112,24 @@ npx shadcn@latest add [component-name]
|
||||
|
||||
Components are installed to `components/ui/`. Do not manually edit these files; they can be regenerated.
|
||||
|
||||
## pnpm / sharp build (CI gotcha)
|
||||
|
||||
pnpm 11 hard-fails `pnpm install --frozen-lockfile` with
|
||||
`[ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: [email protected]` (exit 1) unless
|
||||
sharp's native build script is explicitly accounted for. sharp ships prebuilt
|
||||
binaries, so its build script is unnecessary and should stay skipped.
|
||||
|
||||
- `pnpm-workspace.yaml` records the decision as `allowBuilds:\n sharp: false`.
|
||||
This **must be a real boolean** (`false`/`true`). A non-boolean value (e.g. the
|
||||
placeholder string `set this to true or false`) does NOT count as a decision and
|
||||
breaks CI. `onlyBuiltDependencies` / `ignoredBuiltDependencies` are NOT honored
|
||||
for this in pnpm 11 — only `allowBuilds`. Verify before pushing:
|
||||
`git show HEAD:pnpm-workspace.yaml`.
|
||||
- Because that value is easy to corrupt, the Docker build is made resilient: the
|
||||
`pnpm install` step in the `Dockerfile` passes `--config.strictDepBuilds=false`,
|
||||
which downgrades the ignored-builds error to a warning regardless of the
|
||||
workspace file. Keep that flag in place.
|
||||
|
||||
## Important Notes
|
||||
|
||||
- Contact email: contact@cloudrite.co.nz
|
||||
|
||||
Reference in New Issue
Block a user