Skip to content

Conversation

shadowspawn
Copy link
Collaborator

@shadowspawn shadowspawn commented Apr 7, 2023

Problem

People may have installed npm separately before trying n for managing Node.js (node + npm) and shadow the version installed by n.

See: #762

Solution

Add a check to n doctor. This could be detected at install time, but just adding to n doctor for now.

Generates warning like:

Checking npm install destination...
There is an active version of npm shadowing the version installed by n. Check what is in PATH (unless this is expected).
   installed : /usr/local/bin/npm
      active : /Users/john/my_npm/bin/npm

ChangeLog

  • check for possible problem with multiple npm locations when running n doctor

@shadowspawn
Copy link
Collaborator Author

Tracking new cases where an install time check might have helped:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant