ShipNode auto-detects npm, yarn, pnpm, or bun.
ShipNode checks for lockfiles in this order:
| Lockfile | Package Manager |
|---|---|
bun.lockb or bun.lock |
bun |
pnpm-lock.yaml |
pnpm |
yarn.lock |
yarn |
| (none) | npm |
Force a specific package manager in shipnode.conf:
PKG_MANAGER=bunValid values: npm, yarn, pnpm, bun
ShipNode generates these commands based on detected manager:
| Action | npm | yarn | pnpm | bun |
|---|---|---|---|---|
| Install | npm install |
yarn install |
pnpm install |
bun install |
| Build | npm run build |
yarn build |
pnpm run build |
bun run build |
| Start | npm start |
yarn start |
pnpm start |
bun start |
| PM2 start | pm2 start npm -- start |
pm2 start yarn -- start |
pm2 start pnpm -- start |
pm2 start bun -- start |
During shipnode setup, detected package managers are installed:
- npm - Comes with Node.js (no installation needed)
- yarn -
npm install -g yarn - pnpm -
npm install -g pnpm - bun -
curl -fsSL https://bun.sh/install | bash
All package managers support workspaces:
// package.json (npm/yarn/pnpm)
{
"workspaces": ["packages/*"]
}In GitHub Actions, install before deploying:
- name: Install dependencies
run: npm ci # or yarn, pnpm, bun installMake sure lockfiles are committed:
# Keep lockfiles
bun.lockb
pnpm-lock.yaml
yarn.lock
package-lock.json
This ensures consistent installs across all environments.
To switch package managers:
- Remove old lockfile
- Run new package manager install
- Commit new lockfile
- Deploy
ShipNode will auto-detect the new lockfile.