Vue 打包 Error: error:0308010C:digital envelope routines::unsupported
这个错误通常与Node.js的加密模块和OpenSSL版本有关
出现这个错误是因为 node.js V17版本中最近发布的OpenSSL3.0, 而OpenSSL3.0对允许算法和密钥大小增加了严格的限制,可能会对生态系统造成一些影响.
js/app.8d066b51.js from Terser
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:79:19)
at Object.createHash (node:crypto:139:10)
at D:\Projects\15.ithoth\01.SourceCode\Web\branches\V1.0.13\node_modules\terser-webpack-plugin\dist\index.js:217:37
at Array.forEach (<anonymous>)
at TerserPlugin.optimizeFn (D:\Projects\15.ithoth\01.SourceCode\Web\branches\V1.0.13\node_modules\terser-webpack-plugin\dist\index.js:160:259)
at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Projects\15.ithoth\01.SourceCode\Web\branches\V1.0.13\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:7:1)
at AsyncSeriesHook.lazyCompileHook (D:\Projects\15.ithoth\01.SourceCode\Web\branches\V1.0.13\node_modules\webpack\node_modules\tapable\lib\Hook.js:154:20)
at D:\Projects\15.ithoth\01.SourceCode\Web\branches\V1.0.13\node_modules\webpack\lib\Compilation.js:1409:36
at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Projects\15.ithoth\01.SourceCode\Web\branches\V1.0.13\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
at AsyncSeriesHook.lazyCompileHook (D:\Projects\15.ithoth\01.SourceCode\Web\branches\V1.0.13\node_modules\webpack\node_modules\tapable\lib\Hook.js:154:20)
at D:\Projects\15.ithoth\01.SourceCode\Web\branches\V1.0.13\node_modules\webpack\lib\Compilation.js:1405:32
解决方案
如果CMD 发布,则在 Windows系统 增加环境变更
set NODE_OPTIONS=--openssl-legacy-provider
本文来自博客园,作者:VipSoft 转载请注明原文链接:https://www.cnblogs.com/vipsoft/p/18241673
分类:
Vue
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· 清华大学推出第四讲使用 DeepSeek + DeepResearch 让科研像聊天一样简单!
· 实操Deepseek接入个人知识库
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
2021-06-11 Nacos 服务状态监听四种写发
2012-06-11 UML中的五种关系