nodejs icon indicating copy to clipboard operation
nodejs copied to clipboard

Allow users to use a specific version of npm

Open ryanmoran opened this issue 5 years ago • 7 comments

The current set of buildpacks installs a version of npm based on the chosen version of node. Sometimes users will want to choose a different version of npm than the version that came with the node version they've chosen. We should create a mechanism for users to specify a version of npm to install.

ryanmoran avatar Nov 02 '20 16:11 ryanmoran

@ryanmoran or @trevorblades, is this still a relevant feature request for you?

fg-j avatar Nov 30 '21 15:11 fg-j

Yes. I would like to see this happen.

ryanmoran avatar Dec 01 '21 16:12 ryanmoran

@paketo-buildpacks/nodejs-maintainers Any blockers or things to keep in mind when implementing this feature?

fg-j avatar Dec 01 '21 16:12 fg-j

@ryanmoran What would be the reason for choosing a different version of npm? A more current one?

c0d1ngm0nk3y avatar Mar 03 '23 14:03 c0d1ngm0nk3y

@c0d1ngm0nk3y yes. Or to be able to roll back to a different version if a bug is discovered in the version that ships with Node.js.

ryanmoran avatar Mar 09 '23 15:03 ryanmoran

Is this feature still under consideration? There are reasons to use a different npm version than the default one, such as bugs or testing new features

Waterstraal avatar May 06 '24 14:05 Waterstraal

What about if the npm-install buildpack receives a BP_NPM_VERSION which results in npm install npm@<version> being installing the actual node-modules?

c0d1ngm0nk3y avatar May 16 '24 13:05 c0d1ngm0nk3y