Skip to content

Can't use recent NPM 11 version #926

Description

@calle2010

I want to use a recent NPM 11 version because of "min-release-age" support for security reasons. This is supported since NPM 11.10.0

I configure package.json with

  "engines": {
    "node": "22.x.x",
    "npm": "^11.17.0"
  },

Result at "cf push":

   Downloading nodejs_buildpack...
   Downloaded nodejs_buildpack
   Cell de8a932b-8e7a-4491-8132-cab06549fab1 creating container for instance dd385186-0cf0-483c-9f8c-3c2531c5921c
   Security group rules were updated
   Cell de8a932b-8e7a-4491-8132-cab06549fab1 successfully created container for instance dd385186-0cf0-483c-9f8c-3c2531c5921c
   Downloading build artifacts cache...
   Downloading app package...
   Downloaded app package (208.7K)
   Downloaded build artifacts cache (6.5M)
   -----> Nodejs Buildpack version 1.9.1
   -----> Bootstrapping python
   -----> Installing python 3.13.13
   Copy [/tmp/buildpacks/10f09efe13202c96/dependencies/268a5e3743d51a14b86ea9da64439307/python_3.13.13_linux_x64_cflinuxfs4_8311abbf.tgz]
   -----> Installing binaries
   engines.node (package.json): 22.x.x
   engines.npm (package.json): ^11.17.0
   -----> Installing node 22.22.2
   Copy [/tmp/buildpacks/10f09efe13202c96/dependencies/5deea320c19fa94e977cff523ac00f82/node_22.22.2_linux_x64_cflinuxfs4_e5459374.tgz]
   Downloading and installing npm ^11.17.0 (replacing version 10.9.7)...
   npm error code MODULE_NOT_FOUND
   npm error Cannot find module 'promise-retry'
   npm error Require stack:
   npm error - /tmp/contents4170297615/deps/0/node/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js
   npm error - /tmp/contents4170297615/deps/0/node/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/index.js
   npm error - /tmp/contents4170297615/deps/0/node/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/index.js
   npm error - /tmp/contents4170297615/deps/0/node/lib/node_modules/npm/node_modules/libnpmfund/lib/index.js
   npm error - /tmp/contents4170297615/deps/0/node/lib/node_modules/npm/lib/utils/reify-output.js
   npm error - /tmp/contents4170297615/deps/0/node/lib/node_modules/npm/lib/utils/reify-finish.js
   npm error - /tmp/contents4170297615/deps/0/node/lib/node_modules/npm/lib/commands/install.js
   npm error - /tmp/contents4170297615/deps/0/node/lib/node_modules/npm/lib/npm.js
   npm error - /tmp/contents4170297615/deps/0/node/lib/node_modules/npm/lib/cli/entry.js
   npm error - /tmp/contents4170297615/deps/0/node/lib/node_modules/npm/lib/cli.js
   npm error - /tmp/contents4170297615/deps/0/node/lib/node_modules/npm/bin/npm-cli.js
   npm error A complete log of this run can be found in: /home/vcap/.npm/_logs/2026-06-24T07_51_07_252Z-debug-0.log
   **ERROR** We're unable to download the version of npm you've provided (^11.17.0).
   Please remove the npm version specification in package.json
   **ERROR** Unable to install npm: exit status 1
BuildpackCompileFailed - App staging failed in the buildpack compile phase
FAILED

This is a known regression of Node.js 22.22.2 (nodejs/node#62425) and was fixed in Node.js 22.22.3.

But I can't use Node.js 22.22.3 because it is not supported in versions 1.9.1 and 1.9.2 of the Node.js buildpack:

   engines.node (package.json): ^22.22.3
   engines.npm (package.json): ^11.17.0
   **ERROR** Unable to install node: no match found for ^22.22.3 in [20.19.5 20.20.0 22.22.2 24.14.0 24.15.0]
   Failed to compile droplet: Failed to run all supply scripts: exit status 14

Please update Node.js support for 22.22.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions