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:

  1. Upgrade Node.js by downloading and installing the latest Node.js LTS version.
  2. 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.

posted @   易先讯  阅读(201)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· AI 智能体引爆开源社区「GitHub 热点速览」
· 写一个简单的SQL生成工具
点击右上角即可分享
微信分享提示