-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[BUG] After update to npm 7 it seems no global packages are recognized #2002
Comments
In addition there is also the issue #1962 |
I had this same problem on my MacOS system, but fixed it with (It seems on upgrade it loses track of where the global node_modules folder is, but install knows where it is? I dunno.) Didn't fix the "global requires an add or rm option" tho. |
What's also strange is that |
After installing node 15 and npm 7, the npm global modules install into this path... instead of.... Which path should be made the canonical path to use? |
could solve the problem for someone (not for me #1962 (comment)) |
@funfunction |
@funfunction if you have installed node 15 properly, it will always come with npm 7. If it doesn't, your install method is likely broken. |
I think it's more about npm 7's global package linking being broken (since npm itself is an npm package) |
@nickmccurdy on a fresh install of node, npm isn’t linked, and on any node 15, it’s always npm 7. |
I fixed it by cd-ing into AppData\Roaming\npm then running: npm link npm After 10 years of using node, this is the first time I had to do this. |
Installed npm 7.0.10 (which should fix #1962) : ` 42 verbose stack at eloop (C:\Users\XXXXX\node_modules\npm\node_modules@npmcli\arborist\lib\realpath.js:57:17) 42 verbose stack at C:\Users\XXXXX\node_modules\npm\node_modules@npmcli\arborist\lib\realpath.js:82:15 42 verbose stack at async Arborist.[loadActual] (C:\Users\XXXXX\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\load-actual.js:118:13) ` |
I had to reinstall all global packages. Now they are listed by npm and executable. |
When a file named 'npmrc' is in the root of the npm module that is currently running, it adds config values that override the defaults (but not the global or user configs). This is a way for a system package installer to tell the npm that it installs to put its globals somewhere other than the default. In order to keep these configs around when users self-update npm with `npm i -g npm`, these config values must be "sticky", and ride along into the newly globally installed npm. This commit restores this behavior, fixing self-updating npm for Windows users, and any other systems that may make use of this functionality. Fixes: #2002
So I had
Then I run
...which fails to load the previous (default) This still seems like it's off. I've fixed mine by adding a |
even last version 7.3.0 not listing globally installed packages: is it a new Arborist tree list bug? |
Yes. I had installed 7.2.0 and it has screwed up the packages again. :( |
Upgraded from node 14 to node 15.0.0
Upgraded npm to 7.0.3
Current Behavior:
npm --outdated -g
only shows a DOWNGRADE from npm 7 to 6
npm list -g --depth= 0
it does not show the intalled global packages, but only npm
Expected Behavior:
the complete list of installed global packages should be listed.
Steps To Reproduce:
Environment:
The text was updated successfully, but these errors were encountered: