Skip to content

Conversation

@mywildquant
Copy link

bugfix: When process.env.NODE_PATH is set, npm-check -g still goes into globalModulesPath instead of NODE_PATH

@LinusU
Copy link
Collaborator

LinusU commented Nov 26, 2018

@lcxfs1991 could you review this please? ☺️

@totkeks
Copy link

totkeks commented Apr 23, 2019

Can anyone merge this pull request? That would be super handy, because I just had exactly this problem when working with NVM (node version manager) on windows, because it uses different, symlinked folders, so setting NODE_PATH helps alot.

@jacobrillema
Copy link

jacobrillema commented Aug 2, 2019

@totkeks I just hit the same issue. @dylang, @lcxfs1991, @LinusU or @mansona Can we please merge this in? It will greatly help us few Window users out here!

@Suzakura
Copy link

Suzakura commented Oct 13, 2020

I have encountered the same error too.

===============================
The global path you are searching is: D:\xampp\node\node_modules\
[npm-check] debug
set key cwd to value C:\Users\Suzakura\AppData\Roaming\npm\node_modules
===============================

I sincerely hope that this will improve.

@stefanwascoding
Copy link

Ran into this issue on macOS 26 with a homebrew npm installation, my NODE_PATH is set to ${HOME}/.local/share/npm/lib/node_modules:/opt/homebrew/lib/node_modules, and npm-check (correctly) picks the first one as the "global path you are searching", but then sets the cwd key to the latter one.

Applying this pull request fixes the issue.

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.

6 participants