Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nodejs报错digital envelope routines::unsupported原因以及解决 #229

Open
soapgu opened this issue Oct 31, 2023 · 0 comments
Open

Nodejs报错digital envelope routines::unsupported原因以及解决 #229

soapgu opened this issue Oct 31, 2023 · 0 comments
Labels
problem problem or trouble

Comments

@soapgu
Copy link
Owner

soapgu commented Oct 31, 2023

  • 前言

突然我的nodejs运行报错了
主要有下面两点比较有疑惑

  1. 改动范围极小,并没有动用到架构层面
  2. 项目以前一直没有报错
  • 原因

后来一查原因,主要还是node版本的问题。

一般描述的大致原因就是:当 nodejs 升级到17+版本以后,开始支持 OpenSSL 3.0,而 OpenSSL 3.0 对各种摘要算法做了更严格的限制,可能会导致一些程序运行错误。

问题是我的node版本是啥时候改的呀

对了我是用的是 brew

每次用brew,他会“自说自话”给你更新软件

guhui@guhuideMacBook-Pro libmupdf % brew info node
==> node: stable 20.6.1 (bottled), HEAD
Platform built on V8 to build network applications
https://nodejs.org/
/opt/homebrew/Cellar/node/20.6.1 (2,398 files, 57.5MB) *
  Poured from bottle using the formulae.brew.sh API on 2023-09-15 at 16:47:35
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/node.rb
License: MIT
==> Dependencies
Build: pkg-config ✔, python@3.11 ✔
Required: brotli ✔, c-ares ✔, icu4c ✔, libnghttp2 ✔, libuv ✔, openssl@3 ✔
==> Options
--HEAD
	Install HEAD version
==> Analytics
install: 209,881 (30 days), 659,267 (90 days), 1,603,989 (365 days)
install-on-request: 178,934 (30 days), 567,537 (90 days), 1,412,095 (365 days)
build-error: 496 (30 days)

果然我本机的环境“被更新”到了20

  • nvm

使用nvm就可以解决这个问题,可以自由切换node版本。
安装的技术支持还是看同事的Blog比较靠谱点(主要是找得到人!)
安装的时候碰到Failed to connect to raw.githubusercontent.com:443的报错,需要配置下翻墙的端口代理搞定

@soapgu soapgu added the problem problem or trouble label Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem problem or trouble
Projects
None yet
Development

No branches or pull requests

1 participant