首页 前端知识 【问题解决】npm nodejs编译报错问题Error: error:0308010C:digital envelope routines::unsupported

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

2024-06-22 10:06:10 前端知识 前端哥 954 953 我要收藏

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

转载请注明出处或者链接地址:https://www.qianduange.cn//article/13303.html
标签
评论
发布的文章

Java操作读取JSON文件

2024-07-21 00:07:04

Vue3.0环境搭建之npm的安装

2024-07-21 00:07:09

大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!