You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: install devDependencies on the server so builds work
Default install commands for npm, yarn, and bun dropped the --production
flag — without devDependencies the build step (tsc, vite, tsup) fails.
pnpm was already correct; this completes the same fix for the others.
Adds .installCommand(cmd) and .pkgManager(pm, { installCommand }) for
users who need different flags (e.g. --legacy-peer-deps). The override
applies to both the initial install and the post-symlink relink.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,15 @@ All notable changes to `@devalade/shipnode` will be documented here.
15
15
-**PM2 status check** — after every deploy, `pm2 jlist` is parsed and each declared app must be `online` with `restart_time === 0`. Catches workers that boot and crash before the HTTP health check would notice anything. Runs even on worker-only deployments.
16
16
-**Per-app `env`** — each `pm2.apps` entry can set its own env vars (`{ WORKER_QUEUE: 'emails' }`); PM2 loads the shared `.env` via `env_file` and applies per-app overrides on top.
17
17
18
+
### Fixed
19
+
-**Builds no longer fail because devDependencies are missing.** The default install commands for `npm`, `yarn`, and `bun` no longer pass `--production` / `--frozen-lockfile --production` — they now install everything so the subsequent build step has access to `tsc`, `vite`, `tsup`, etc. (pnpm was already fixed for this in v2.0.13; this completes the same fix for the other package managers.)
20
+
21
+
### Added
22
+
- Two ways to override the server-side install command when you need flags the default doesn't carry (e.g. `'npm ci --legacy-peer-deps'`):
-`.pkgManager(pm, { installCommand: cmd })` — second-arg form, useful when you're already pinning the package manager.
25
+
Both write to the same field. Override applies to both the initial install and the post-symlink relink; `--prefer-offline` is not appended to overridden commands.
26
+
18
27
### Changed
19
28
-**Ecosystem file is per-release** — `ecosystem.config.cjs` now lives inside each release directory instead of `<remotePath>/shared/`. PM2 references it via `<remotePath>/current/ecosystem.config.cjs` so rollback restores the exact process set that was active for that release (a worker added in v2 won't crash-loop after rolling back to v1). See [ADR-0001](docs/adr/0001-per-release-ecosystem-file.md).
20
29
-**Builder back-compat preserved** — `.pm2(name, opts)` and `.port(n)` still work and now act as sugar on the first app. Existing `shipnode.config.ts` files don't need changes.
|`.pkgManager(pm, opts?)`| auto-detected |`npm`\|`yarn`\|`pnpm`\|`bun`; `opts.installCommand` overrides the install command |
107
+
|`.installCommand(cmd)`| derived from pkg manager | Override the install command run on the server (e.g. `'npm ci --legacy-peer-deps'`). Equivalent to `pkgManager(pm, { installCommand: cmd })`|
107
108
|`.buildDir(dir)`| auto-detected | Frontend build output dir |
/** Override the install command run on the server. Defaults to the package manager's standard install (e.g. `npm ci`). Use to add flags like `--legacy-peer-deps`, switch to a frozen-lockfile variant, etc. */
0 commit comments