Hi,
In the documentation is says "You can (but should not?) keep your previous "system" node install". Could you please elaborate on this a bit and let me know how I can safely remove the system node install?
You're welcome to keep or remove it.
How to remove it depends on how you installed it.
I downloaded the 8.11.3 LTS from the node website
In that case youβll need to manually remove the directories if you want to uninstall it; but itβs perfectly fine to keep that around.
No I think it is not perfectly fine to keep that around, because I met a problem, the global modules of system would interfere in node of nvm. Like following.
I had some modules in the global of system node:
GQSM@Applede-MacBook-Pro ~ % nvm current
system
GQSM@Applede-MacBook-Pro ~ % npm ls -g --depth=0
/usr/local/lib
βββ @vue/[email protected]
βββ @vue/[email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
Then I change to node of nvm:
GQSM@Applede-MacBook-Pro ~ % nvm use v12.18.3
Now using node v12.18.3 (npm v6.14.6)
GQSM@Applede-MacBook-Pro ~ % npm ls -g --depth=0
/Users/GQSM/.nvm/versions/node/v12.18.3/lib
βββ [email protected]
GQSM@Applede-MacBook-Pro ~ % webpack-cli --version
3.1.0
When I change to node of nvm, I still can access modules of system node. My version of nvm is v0.35.3, I don't know how to solve this problemm. But I think the problem is with node of system?
@ms314006 thats a feature, not a bug. You can either uninstall those system global modules (or your entire system node), you can remove that directory from your PATH, or you can install the same global modules in your nvm-managed node.
The best alternative is to avoid having global modules installed at all :-) install things locally and/or use npx.
@ljharb I am really grateful your reply so fast and clearly! I will try to uninstall entire system node, really thank for your comments!