---
title: "How to Use pnpm on Heroku"
description: "Heroku's Node.js buildpack now supports pnpm, and early adopters saw 10-40% faster installs than npm, thanks to pnpm's content-addressable store, symlinked dependencies and overlapping resolve/fetch/link stages."
url: "https://swe.quest/articles/how-to-use-pnpm-on-heroku-b64d4748dc64db6e"
canonical: "https://www.heroku.com/blog/using-pnpm-on-heroku/"
source: "Heroku Engineering"
published: "2024-07-19"
difficulty: "medium"
kind: "How-to"
reading_minutes: 4
tags: ["javascript","build-systems","deployment","cloud"]
---

# How to Use pnpm on Heroku

A post on [Heroku Engineering](https://swe.quest/sources/heroku.md), published 2024-07-19, 4 min read, How-to. Original: [https://www.heroku.com/blog/using-pnpm-on-heroku/](https://www.heroku.com/blog/using-pnpm-on-heroku/)

## Summary

Heroku's Node.js buildpack now supports pnpm, and early adopters saw 10-40% faster installs than npm, thanks to pnpm's content-addressable store, symlinked dependencies and overlapping resolve/fetch/link stages. The walkthrough enables Corepack, pins pnpm with an integrity-hashed packageManager field in package.json, and builds a small Express app with a Procfile, then deploys it via git push. A committed pnpm-lock.yaml is required for the buildpack to detect pnpm, and pinning the exact package manager version keeps builds deterministic.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [Build systems](https://swe.quest/tags/build-systems.md) (Engineering practices)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)

## Prerequisites

- Node.js and npm basics ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- Git

## Keywords

pnpm, Heroku, Corepack, Node.js buildpack, Express, npm

## Related posts

- [Dependency prefixes are a supply chain risk: let's fix them](https://swe.quest/articles/dependency-prefixes-are-a-supply-chain-risk-let-s-fix-them-9228bb37d2c90199.md): Sourcegraph · 2026-05-22 · Medium · 5 min read · Supply chain security, JavaScript, Build systems, Refactoring & migrations
  SemVer range prefixes like ^, ~ and wildcards in package.json act as a trust policy that lets compromised or hijacked packages flow into CI and production on the next install.
- [Protecting your Supabase projects from npm supply chain attacks](https://swe.quest/articles/protecting-your-supabase-projects-from-npm-supply-chain-attacks-fac18687d5c6f3f1.md): Supabase · 2026-05-26 · Medium · 8 min read · Supply chain security, JavaScript, CI/CD, AI for coding
  npm supply chain attacks reach Supabase users through three common paths: maintainer compromise, typosquatting (including a real \`supabase-javascript\` package and AI-hallucinated names), and build pipeline compromise like the TanStack attack via \`pull\_request\_target\` and a poisoned Actions cache.
- [How to use NPM packages outside of Node](https://swe.quest/articles/how-to-use-npm-packages-outside-of-node-508dc33f07d169fa.md): Neon · 2023-11-06 · Medium · 6 min read · JavaScript, Serverless, Build systems, PostgreSQL
  Many npm packages depend on Node-only globals like Buffer or built-ins like fs and net, which break on Vercel Edge Functions, Cloudflare Workers and browsers.
- [Introducing your new JavaScript package manager: Deno](https://swe.quest/articles/introducing-your-new-javascript-package-manager-deno-23f4f8f8933d6ca1.md): Deno · 2024-11-08 · Medium · 4 min read · JavaScript, Build systems, Developer tools, Supply chain security
  Deno 2 adds \`deno add\`, \`deno remove\`/\`uninstall\`, and \`deno install\` subcommands that manage npm and JSR dependencies in either \`deno.json\` import maps or an existing \`package.json\`, so they work inside Node projects too.
- [Bun v1.2.19](https://swe.quest/articles/bun-v1-2-19-81c69ec42f42be6c.md): Bun · 2025-07-19 · Medium · 16 min read · JavaScript, Build systems, Developer tools, Testing, PostgreSQL
  Bun v1.2.19 adds pnpm-style isolated installs (\`--linker=isolated\`) for monorepos, \`bun update --interactive\`, \`bun pm pkg\` for editing package.json, \`bun why\` for tracing dependency chains, and a fixed dependency-group priority order.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
