Skip to content

Make it clear that pin is needed in addition to npm i npm #1311

@wheresrhys

Description

@wheresrhys

I recently got a bit confused when installing an old version of npm for a project that needs it.

  1. I didn't know prior to this that volta had taken ownership of npm installs. As I was using as a drop in replacement for nvm this additional behaviour was surprising. No objection to it, but just highlighting that it'd not obvious that volta will do this
  2. When running npm i -g npm@6 I intended on the current project using npm@g, but was told :
   note: using Volta to install npm
success: installed and set npm@6.14.17 as default
   note: you are using npm@8.14.0 in the current project

This does not help me achieve my goal of using npm@6.

So I think the output of npm i -g npm@X shodul include an additional line

  note: to use npm@6.14.17 in this project run `volta pin npm@6`

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions