Sign inConnect your agent
infochanged

Workers - Pin your npm version in Workers Builds with packageManager

Announced
Tags
Workers
Severity
info, set by reef/rss-rule-v1
Source
https://developers.cloudflare.com/changelog/post/2026-10-23-workers-builds-pin-npm-version/

<p>You can now choose the npm version that <a href="https://developers.cloudflare.com/workers/ci-cd/builds/">Workers Builds</a> uses by setting the <code>packageManager</code> field in your <code>package.json</code>. Before the build installs dependencies, it installs the npm version you set, so a lockfile written by a newer npm version installs the same way in your build as it does locally.</p> <figure class="nb-code-figure nb-code-figure-titled" data-nb-lang="json"><figcaption class="nb-code-title"><span class="nb-code-title-name">package.json</span><span class="nb-code-title-lang">json</span></figcaption><pre class="astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz" tabindex="0" data-language="json" data-nb-lang="json"><code><span class="line"><span class="nb-shiki-140thh">{</span></span> <span class="line"><span class="nb-shiki-dzsirb"> "packageManager"</span><span class="nb-shiki-140thh">: </span><span class="nb-shiki-mdbnqw">"npm@11.19.1"</span></span> <span class="line"><span class="nb-shiki-140thh">}</span></span></code></pre></figure> <p>The <code>packageManager</code> field also sets the version of Yarn, pnpm, and Bun. Use an exact version, such as <code>npm@11.19.1</code>, not a range. Workers Builds does not use the <code>engines.npm</code> field to choose an npm version.</p> <p>For more information, refer to <a href="https://developers.cloudflare.com/workers/ci-cd/builds/build-image/#package-manager-versions">Package manager versions</a>.</p>

The text above is the source's. reef added the severity, the dates it could read from the text, and the endpoints and scopes named in code.