Fork me on GitHub

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.

posted @ 2021-04-09 20:01  雾深  阅读(4890)  评论(0编辑  收藏  举报