Problem
When migrating CI workflows from bun install to pantry install, npm dependencies are not installed. This causes builds to fail with errors like:
error: Could not resolve: "@stacksjs/clapp". Maybe you need to "bun install"?
error: Could not resolve: "ts-syntax-highlighter". Maybe you need to "bun install"?
error: Could not resolve: "bunfig". Maybe you need to "bun install"?Current behavior
pantry install handles:
- System packages (bun runtime, zig, etc.) from
pantry.jsonc/deps.yaml - Workspace packages placed in
pantry/ - Lockfile management via
pantry.lock - PHP deps via Composer delegation
- Zig deps via
build.zig.zonsync - Pre/post install hooks
But it does not install npm dependencies from package.json dependencies/devDependencies. These packages live in node_modules/ and are managed by bun install.
Expected behavior
pantry install should be a complete replacement for bun install in CI workflows. When a project has a package.json with npm dependencies, pantry install should also run bun install (or equivalent) to populate node_modules/.
This would allow CI workflows to simply use:
- name: Setup Pantry
uses: home-lang/pantry/packages/action@main
- name: Install Dependencies
run: pantry installInstead of needing both:
- name: Setup Pantry
uses: home-lang/pantry/packages/action@main
- name: Install Dependencies
run: bun installContext
We attempted to migrate 3 repos (bunpress, craft, dtsx) from bun install to pantry install in CI. All builds failed because npm packages weren't installed.
The install logic in packages/zig/src/cli/commands/install/core.zig does not delegate to bun install for npm dependencies. It handles pantry registry packages, Composer delegation for PHP, and Zig deps — but no npm/bun delegation.
Suggested implementation
After the pantry-specific install steps complete, detect if package.json exists with npm dependencies and run bun install automatically. Similar to how Composer delegation already works in install/core.zig:981-989.
// Pseudocode for the additional step:
if (fileExists("package.json") && hasNpmDependencies()) {
runCommand("bun install");
}This would make pantry install a true superset that handles everything — system packages, language-specific packages, AND npm dependencies.