当前位置:   article > 正文

【问题解决】npm nodejs编译报错问题Error: error:0308010C:digital envelope routines::unsupported_at compilation.finish

at compilation.finish

js/app.185a3b28.js from Terser
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:68:19)
at Object.createHash (node:crypto:138:10)
at G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\terser-webpack-plugin\dist\index.js:217:37
at Array.forEach ()
at TerserPlugin.optimizeFn (G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\terser-webpack-plugin\dist\index.js:160:259)
at AsyncSeriesHook.eval [as callAsync] (eval at create (G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\tapable\lib\HookCodeFactory.js:33:10), :7:1)
at AsyncSeriesHook.lazyCompileHook (G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\tapable\lib\Hook.js:154:20)
at G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\webpack\lib\Compilation.js:1409:36
at AsyncSeriesHook.eval [as callAsync] (eval at create (G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1)
at AsyncSeriesHook.lazyCompileHook (G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\tapable\lib\Hook.js:154:20)
at G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\webpack\lib\Compilation.js:1405:32
at AsyncSeriesHook.eval [as callAsync] (eval at create (G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1)
at AsyncSeriesHook.lazyCompileHook (G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\tapable\lib\Hook.js:154:20)
at Compilation.seal (G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\webpack\lib\Compilation.js:1342:27)
at G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\webpack\lib\Compiler.js:675:18
at G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\webpack\lib\Compilation.js:1261:4
at AsyncSeriesHook.eval [as callAsync] (eval at create (G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\tapable\lib\HookCodeFactory.js:33:10), :24:1)
at AsyncSeriesHook.lazyCompileHook (G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\tapable\lib\Hook.js:154:20)
at Compilation.finish (G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\webpack\lib\Compilation.js:1253:28)
at G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\webpack\lib\Compiler.js:672:17
at _done (eval at create (G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\tapable\lib\HookCodeFactory.js:33:10), :9:1)
at eval (eval at create (G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\tapable\lib\HookCodeFactory.js:33:10), :32:22)
at G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\webpack\lib\Compilation.js:1185:12
at G:\work\media\sms\ZLM_UI\MediaServerUI\node_modules\webpack\lib\Compilation.js:1097:9
at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
在这里插入图片描述

解决:
Mac/linux:
export NODE_OPTIONS=–openssl-legacy-provider
Windows:
set NODE_OPTIONS=–openssl-legacy-provider

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/运维做开发/article/detail/863397
推荐阅读
相关标签
  

闽ICP备14008679号