How To Fix the ERR_OSSL_EVP_UNSUPPORTED Error in Node.js
Fix the ERR_OSSL_EVP_UNSUPPORTED Error
There are two ways to fix the ERR_OSSL_EVP_UNSUPPORTED
error:
- Upgrade Node.js by downloading and installing the latest Node.js LTS version.
- Use the
--openssl-legacy-provider
option.
If you cannot or do not want to update your Node.js version, you can fix the problem with a workaround. Specifically, Node.js 17 introduced the --openssl-legacy-provider
command line option to revert to the legacy OpenSSL provider.
Use --openssl-legacy-provider
in the start
npm script as follows:
NODE_OPTIONS=--openssl-legacy-provider npm run start
On Windows, it becomes:
set NODE_OPTIONS=--openssl-legacy-provider && npm run start
In React, update the start
and build
scripts in package.json
with:
"start": "react-scripts --openssl-legacy-provider start",
"build": "react-scripts --openssl-legacy-provider build"
Check out this article to learn how to fix the error in other technologies and platforms.
Et voilà! Your application should now work like a charm!
linux/git bash
export NODE_OPTIONS=--openssl-legacy-provider && npm run start
Conclusion
ERR_OSSL_EVP_UNSUPPORTED
is an annoying error. Anyway, addressing is not difficult and in this article you learned how to do it. In detail, you understood why Node.js 17 raises that error and how to fix it with the --openssl-legacy-provider
command line option.
Thanks for reading! I hope you found this article helpful. Feel free to leave any questions, comments, or suggestions.
本文来自博客园,作者:易先讯,转载请注明原文链接:https://www.cnblogs.com/gongxianjin/p/17532396.html
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· winform 绘制太阳,地球,月球 运作规律
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· AI 智能体引爆开源社区「GitHub 热点速览」
· 写一个简单的SQL生成工具