Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add npm check to doctor #764

Merged
merged 2 commits into from
Apr 15, 2023
Merged

Add npm check to doctor #764

merged 2 commits into from
Apr 15, 2023

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.

None yet

1 participant