npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142解決方法


最近使用nodejs時遇到npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142問題

最后在外網翻到可行答案,並翻譯記錄了一下。原文鏈接 侵刪

如何從Windows完全刪除node.js?
最近更新: 2021年2月23日
我們可以使用以下簡單步驟從Windows完全刪除Node.js:

步驟1:每當我們使用命令npm install 安裝軟件包時,npm會將緩存存儲在用戶文件系統中。Windows上存儲緩存數據的默認目錄為%AppData%/ npm-cache。因此,我們需要先清理緩存。可以使用以下命令清除緩存。
npm cache clean --force

步驟2:之后,您可以使用以下命令來驗證緩存:
npm cache verify

步驟3: 現在,打開計算機中的控制面板。搜索程序和功能。在程序和功能下,單擊“卸載程序”。現在搜索Node.js並將其卸載。

步驟4:重新啟動計算機,或從任務管理器中終止所有與節點有關的進程。

步驟5:在您的計算機中查找文件夾,如果存在,請將其刪除。這些文件夾可能會或可能不會存在於您的計算機中,具體取決於各種因素,例如安裝的版本或CPU體系結構。

  • C:\ Program Files(x86)\ Nodejs
  • C:\ Program Files \ Nodejs
  • C:\ Users \ {User} \ AppData \ Roaming \ npm或打開運行並鍵入appdata,然后單擊“確定”並在其中打開漫游,您將找到npm。
  • C:\ Users \ {User} \ AppData \ Roaming \ npm-cache或打開運行並鍵入appdata,然后單擊“確定”並在其中打開漫游,您將找到npm-cache。
  • C:\ Users \ {User} \。npmrc
  • C:\ Users \ {User} \ AppData \ Local \ Temp \ npm- *

步驟6:之后,檢查環境路徑變量,並確保不存在對npm或Node.js的引用。

步驟7:如果仍未卸載Node.js,則打開命令提示符並鍵入以下命令:
where node

步驟8:如果未卸載Node.js,該命令將輸出Node.js的位置。轉到該位置並卸載目錄。

步驟9:重新啟動計算機。現在已完全卸載Node.js。

補充:不行的話再試試下面的
Open your command prompt and uninstall angular/cli by using
npm uninstall -g angular-cli command.

Remove node_modules directory and then clear the cache by using
npm cache clear --force command.

Remove
C:\Users \AppData\Roaming\npm
you can remove the folder this way
rmdir C:\Users<username>\AppData\Roaming\npm\ /s
and
C:\Users \AppData\Roaming\npm-cache.
you can remove the folder this way
rmdir C:\Users<username>\AppData\Roaming\npm-cache /s

Now try to install the angular/cli@latest by using npm install -g @angular/cli@latest command.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM