如何删除全局npm包?

问题描述 投票:0回答:1

我正在努力处理角度版本和包。 我一直在尝试卸载 Angular/cli 但没有成功。这是我的命令

pwsh> npm ls -g --depth=0
C:\Users\synta\AppData\Roaming\npm
+-- @angular/[email protected]
`-- @microsoft/[email protected]

pwsh> npm uninstall -g @angular/[email protected]

up to date in 252ms
pwsh> npm ls -g --depth=0
C:\Users\synta\AppData\Roaming\npm
+-- @angular/[email protected]
`-- @microsoft/[email protected]

pwsh> npm cache verify
Cache verified and compressed (~\AppData\Local\npm-cache\_cacache)
Content verified: 639 (25747808 bytes)
Index entries: 639
Finished in 1.829s
pwsh> npm ls -g --depth=0
C:\Users\synta\AppData\Roaming\npm
+-- @angular/[email protected]
`-- @microsoft/[email protected]

看来我无法摆脱这个包裹... 有什么建议吗?

angular npm
1个回答
0
投票

我相信您的问题已经在这里得到解答:如何卸载/升级 Angular CLI?

解决方案似乎是在不指定版本的情况下运行

npm uninstall -g @angular/cli
,然后
npm cache clean --force
清除缓存

© www.soinside.com 2019 - 2024. All rights reserved.