nodejs打包有时候会出现文件过大的问题

-  Building for production...[BABEL] Note: The code generator has deoptimised the styling of D:\javaProject\platform\backend-ui-lanyuancc\backend-ui-lanyuancc\src\components\AddressCascader\address.js as it exceeds the max of 500KB.
 ERROR  Error: error:0308010C:digital envelope routines::unsupported
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)
    at D:\javaProject\platform\backend-ui-lanyuancc\backend-ui-lanyuancc\node_modules\compression-webpack-plugin\dist\index.js:243:42
    at CompressionPlugin.compress (D:\javaProject\platform\backend-ui-lanyuancc\backend-ui-lanyuancc\node_modules\compression-webpack-plugin\dist\index.js:284:9)
    at D:\javaProject\platform\backend-ui-lanyuancc\backend-ui-lanyuancc\node_modules\compression-webpack-plugin\dist\index.js:305:12
    at _next3 (eval at create (D:\javaProject\platform\backend-ui-lanyuancc\backend-ui-lanyuancc\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:17)
    at eval (eval at create (D:\javaProject\platform\backend-ui-lanyuancc\backend-ui-lanyuancc\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:35:1)
    at D:\javaProject\platform\backend-ui-lanyuancc\backend-ui-lanyuancc\node_modules\copy-webpack-plugin\dist\index.js:91:9

可以使用:

set NODE_OPTIONS=--openssl-legacy-provider
npm run build:prod

0

版权声明 ▶ 本网站名称:我的学习笔记
▶ 本文链接:https://ooolo.net/article/554.html
▶ 本网站的文章部分内容可能来源于网络,仅供大家学习与参考,如有侵权,请联系站长进行核实删除。
▶ 转载本站文章需要遵守:商业转载请联系站长,非商业转载请注明出处!!!

none
最后修改于:2024年09月18日 17:34

添加新评论

icon_mrgreen.pngicon_neutral.pngicon_twisted.pngicon_arrow.pngicon_eek.pngicon_smile.pngicon_confused.pngicon_cool.pngicon_evil.pngicon_biggrin.pngicon_idea.pngicon_redface.pngicon_razz.pngicon_rolleyes.pngicon_wink.pngicon_cry.pngicon_surprised.pngicon_lol.pngicon_mad.pngicon_sad.pngicon_exclaim.pngicon_question.png