How does Mac npm delete n modules?

cause: cheap hand wants to upgrade nodejs. Npm has installed an updated nodejs that belongs to other directories.
instructions that are now npm cannot operate correctly.
for example,: npm list-g-- depth 0
used to list the node_modules dependency packages under / usr/local/lib/
, and now the result is
/ usr/local/Cellar/node/10.9.0/lib
updated dependency (empty)

.

Why has the path changed?
as a result, I npm can"t delete n even if I want to, and the instruction can"t find n module. The grass egg is dead.
come on, save the little brother.

Aug.22,2021

complain about n this tool, deep hole. After using it, you can't get rid of it and depend on node. For more information on the solution, please see
https://blog.csdn.net/canking.

.
Menu