- 发布:2024-05-23 16:49
- 更新:2024-05-31 11:13
- 阅读:487
【报Bug】app-view.js from Terser Error: error:0308010C:digital envelope routines::unsupported
产品分类: uniapp/App
PC开发环境操作系统: Mac
PC开发环境操作系统版本号: macOS Sonoma 版本14.4.1 (23E224)
HBuilderX类型: 正式
HBuilderX版本号: 4.15
手机系统: 全部
手机厂商: 苹果
页面类型: vue
vue版本: vue2
打包方式: 离线
项目创建方式: HBuilderX
测试过的手机:
操作步骤:
将Hbuildx更新到最新版本
将Hbuildx更新到最新版本
预期结果:
原生App-制作应用wgt包可以正常运行
原生App-制作应用wgt包可以正常运行
实际结果:
控制台报错,打包不成功。
控制台报错,打包不成功。
bug描述:
将HbuildX更新到4.15后运行制作热更包后报错,node版本为20.13.1,npm版本为10.5.2。
如果将Hbuildx还原到4.08则是正常打包
1***@qq.com (作者) - 隔壁小王同学
控制台完整的信息报错如下
16:49:07.593
[广告] 16:49:07.604 uni-cdn,帮你节省至少30%的 CDN 费用!详情
[HBuilder] 16:49:07.613 项目 'st-uniapp-master'开始导出...
[HBuilder] 16:49:07.627 项目 'st-uniapp-master' 开始编译...
[HBuilder] 16:49:08.910 4.08
[HBuilder] 16:49:08.983 正在编译中...
[HBuilder] 16:49:10.119 已忽略静态资源目录:static/h5、static/mp-weixin。详见:https://uniapp.dcloud.net.cn/tutorial/platform.html#static
[HBuilder] 16:49:10.239 uni-app 有新版本发布,请执行 `npx @dcloudio/uvm@latest` 更新,更新日志详见:https://download1.dcloud.net.cn/hbuilderx/changelog/4.15.2024050802.html
[HBuilder] 16:50:31.155 app-view.js from Terser
[HBuilder] 16:50:31.158 Error: error:0308010C:digital envelope routines::unsupported
[HBuilder] 16:50:31.159 at new Hash (node:internal/crypto/hash:69:19)
[HBuilder] 16:50:31.162 at Object.createHash (node:crypto:133:10)
[HBuilder] 16:50:31.164 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/terser-webpack-plugin/dist/index.js:217:37
[HBuilder] 16:50:31.167 at Array.forEach (<anonymous>)
[HBuilder] 16:50:31.169 at TerserPlugin.optimizeFn (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/terser-webpack-plugin/dist/index.js:160:259)
[HBuilder] 16:50:31.172 at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:7:1)
[HBuilder] 16:50:31.175 at AsyncSeriesHook.lazyCompileHook (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/Hook.js:154:20)
[HBuilder] 16:50:31.176 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compilation.js:1409:36
[HBuilder] 16:50:31.179 at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
[HBuilder] 16:50:31.180 at AsyncSeriesHook.lazyCompileHook (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/Hook.js:154:20)
[HBuilder] 16:50:31.183 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compilation.js:1405:32
[HBuilder] 16:50:31.186 at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
[HBuilder] 16:50:31.187 at AsyncSeriesHook.lazyCompileHook (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/Hook.js:154:20)
[HBuilder] 16:50:31.190 at Compilation.seal (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compilation.js:1342:27)
[HBuilder] 16:50:31.193 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compiler.js:675:18
[HBuilder] 16:50:31.198 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compilation.js:1261:4
[HBuilder] 16:50:31.201 at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:24:1)
[HBuilder] 16:50:31.205 at AsyncSeriesHook.lazyCompileHook (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/Hook.js:154:20)
[HBuilder] 16:50:31.209 at Compilation.finish (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compilation.js:1253:28)
[HBuilder] 16:50:31.210 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compiler.js:672:17
[HBuilder] 16:50:31.214 at eval (eval at create (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:11:1)
[HBuilder] 16:50:31.215 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/DynamicEntryPlugin.js:74:20
[HBuilder] 16:50:31.219 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[HBuilder] 16:50:31.222 项目 'st-uniapp-master' 编译成功。
[HBuilder] 16:50:31.223 app-config.js from Terser
[HBuilder] 16:50:31.227 Error: error:0308010C:digital envelope routines::unsupported
[HBuilder] 16:50:31.228 at new Hash (node:internal/crypto/hash:69:19)
[HBuilder] 16:50:31.231 at Object.createHash (node:crypto:133:10)
[HBuilder] 16:50:31.232 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/terser-webpack-plugin/dist/index.js:217:37
[HBuilder] 16:50:31.236 at Array.forEach (<anonymous>)
[HBuilder] 16:50:31.240 at TerserPlugin.optimizeFn (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/terser-webpack-plugin/dist/index.js:160:259)
[HBuilder] 16:50:31.240 at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:7:1)
[HBuilder] 16:50:31.244 at AsyncSeriesHook.lazyCompileHook (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/Hook.js:154:20)
[HBuilder] 16:50:31.247 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compilation.js:1409:36
[HBuilder] 16:50:31.248 at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
[HBuilder] 16:50:31.252 at AsyncSeriesHook.lazyCompileHook (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/Hook.js:154:20)
[HBuilder] 16:50:31.256 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compilation.js:1405:32
[HBuilder] 16:50:31.256 at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
[HBuilder] 16:50:31.260 at AsyncSeriesHook.lazyCompileHook (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/Hook.js:154:20)
[HBuilder] 16:50:31.264 at Compilation.seal (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compilation.js:1342:27)
[HBuilder] 16:50:31.264 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compiler.js:675:18
[HBuilder] 16:50:31.271 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compilation.js:1261:4
[HBuilder] 16:50:31.271 at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:24:1)
[HBuilder] 16:50:31.275 at AsyncSeriesHook.lazyCompileHook (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/Hook.js:154:20)
[HBuilder] 16:50:31.278 at Compilation.finish (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compilation.js:1253:28)
[HBuilder] 16:50:31.278 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compiler.js:672:17
[HBuilder] 16:50:31.282 at eval (eval at create (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:11:1)
[HBuilder] 16:50:31.285 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/DynamicEntryPlugin.js:74:20
[HBuilder] 16:50:31.288 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[HBuilder] 16:50:31.291 app-service.js from Terser
[HBuilder] 16:50:31.294 Error: error:0308010C:digital envelope routines::unsupported
[HBuilder] 16:50:31.297 at new Hash (node:internal/crypto/hash:69:19)
[HBuilder] 16:50:31.301 at Object.createHash (node:crypto:133:10)
[HBuilder] 16:50:31.301 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/terser-webpack-plugin/dist/index.js:217:37
[HBuilder] 16:50:31.305 at Array.forEach (<anonymous>)
[HBuilder] 16:50:31.308 at TerserPlugin.optimizeFn (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/terser-webpack-plugin/dist/index.js:160:259)
[HBuilder] 16:50:31.309 at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:7:1)
[HBuilder] 16:50:31.312 at AsyncSeriesHook.lazyCompileHook (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/Hook.js:154:20)
[HBuilder] 16:50:31.315 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compilation.js:1409:36
[HBuilder] 16:50:31.318 at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
[HBuilder] 16:50:31.319 at AsyncSeriesHook.lazyCompileHook (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/Hook.js:154:20)
[HBuilder] 16:50:31.322 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compilation.js:1405:32
[HBuilder] 16:50:31.325 at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
[HBuilder] 16:50:31.326 at AsyncSeriesHook.lazyCompileHook (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/Hook.js:154:20)
[HBuilder] 16:50:31.329 at Compilation.seal (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compilation.js:1342:27)
[HBuilder] 16:50:31.329 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compiler.js:675:18
[HBuilder] 16:50:31.332 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compilation.js:1261:4
[HBuilder] 16:50:31.335 at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:24:1)
[HBuilder] 16:50:31.336 at AsyncSeriesHook.lazyCompileHook (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/Hook.js:154:20)
[HBuilder] 16:50:31.339 at Compilation.finish (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compilation.js:1253:28)
[HBuilder] 16:50:31.342 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compiler.js:672:17
[HBuilder] 16:50:31.343 at eval (eval at create (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:11:1)
[HBuilder] 16:50:31.346 at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/DynamicEntryPlugin.js:74:20
[HBuilder] 16:50:31.349 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[HBuilder] 16:50:31.352 ERROR Build failed with errors.
[HBuilder] 16:50:31.355 项目 'st-uniapp-master'导出失败
1***@qq.com (作者) - 隔壁小王同学
node版本使用20.13.1使用运行npm run build 和 npm run build:mp-weixin会报错。
packageUser/pages/user/setup/mobileUnbind/mobileUnbind.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 /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/terser-webpack-plugin/dist/index.js:217:37
at Array.forEach (<anonymous>)
at TerserPlugin.optimizeFn (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/terser-webpack-plugin/dist/index.js:160:259)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:7:1)
at AsyncSeriesHook.lazyCompileHook (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/Hook.js:154:20)
at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compilation.js:1409:36
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at AsyncSeriesHook.lazyCompileHook (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/Hook.js:154:20)
at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compilation.js:1405:32
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at AsyncSeriesHook.lazyCompileHook (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/Hook.js:154:20)
at Compilation.seal (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compilation.js:1342:27)
at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compiler.js:675:18
at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compilation.js:1261:4
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:24:1)
at AsyncSeriesHook.lazyCompileHook (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/Hook.js:154:20)
at Compilation.finish (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compilation.js:1253:28)
at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/Compiler.js:672:17
at eval (eval at create (/Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:11:1)
at /Users/jackliy/Desktop/美亚/demo/git/st-uniapp-master/node_modules/webpack/lib/DynamicEntryPlugin.js:74:20
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
error
...
切换node版本到16.18.1,运行npm run build 和 npm run build:mp-weixin则不会报错,但同样在hbuildx版本为4.15制作热更包报错