解决 Nodejs 使用 npm 安装软件包时提供的 * packages are looking for funding 错误。

错误信息

使用 Nodejs 的 npm 安装软件包时可能会遇到如下错误:

* packages are looking for funding
run 'npm fund' for details

错误分析

* packages are looking for funding 错误是一个打赏提示,提示用户对开发的软件包进行打赏,以激励作者持续更新软件包。

运行 npm fund 命令可以查看软件包提供的打赏地址,进入地址可以打赏作者。

解决方法

使用 npm 的 --no-fund,不提示打赏信息,直接安装软件。

以安装 nrm 软件包为例,不提示打赏信息,直接安装软件:

sudo npm install nrm -g --no-fund