提示的错误信息为: Error message “error:0308010C:digital envelope routines::unsupported” 问题和解决 这是因为 Nodejs 18 使用的 ssl 算法不一样了。 你可以做的是把 Node.js 降级到 16 的版本。 或者针对不同的操作系统运行下面的命令: Unix-like (Linux, macOS, Git bash, etc.): export NODE_OPTIONS=--openssl-legacy-provider Windows command prompt(Windows 命令行工具): set NODE_OPTIONS=--openssl-legacy-provider On PowerShell(Windows PowerShell 命令行工具): $env:NODE_OPTIONS = "--openssl-legacy-provider" 然后再次运行安装命令就可以解决上面的问题。 https://www.isharkfly.com/t/yarn-errordigital-envelope-routines-unsupported/15221