我在尝试在Ubuntu中安装firebase时,每次都会出现这个错误。我使用了命令:
sudo npm install - firebase cli
,但是由于显示“firebase command not found”,我无法登录。基本上,这个错误建议您将 uuid@3.4.0
版本升级到7或者更高版本。
以下是包作者关于废弃的消息;
请升级到7或更高版本。旧版本可能在某些情况下使用Math.random(),这已知存在问题。有关详细信息,请参见 https://v8.dev/blog/math-random。
您可以运行 npm install uuid@latest
以升级到最新稳定版本的 uuid
。
-g
标志进行全局安装(不需要在任何项目的根目录下)。如果未指定,则适用于当前项目(在这种情况下,应在项目的根目录中执行)。 - nyedidikeke试一下这个 npm install uuid@7.0.3 --force
8.3.2
),我仍然被要求将它从至少3.4.0
升级到7
。 - Dzmitry Alifer执行 npm cache clean --force 命令,然后再执行 npm install uuid@7.0.3 --force 命令。
对我起了作用。