javascript 错误:“模块构建失败(来自./node_modules/happypack/loader.js):“

lf3rwulv  于 2023-01-01  发布在  Java
关注(0)|答案(1)|浏览(359)

这是我用于 Jmeter 板项目的主题
https://themeforest.net/item/enlite-prime-reactjs-fullstack-website-template/23803960
但在安装节点模块并执行npm start后出现以下错误。

ERROR in ./app/app.js
Module build failed (from ./node_modules/happypack/loader.js):
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:135:10)
    at filename (/mnt/d/Work/Web Development/Websites/enlite-prime_v19/enlite-prime/node_modules/babel-loader/lib/cache.js:94:23)
    at /mnt/d/Work/Web Development/Websites/enlite-prime_v19/enlite-prime/node_modules/babel-loader/lib/cache.js:122:39
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/mnt/d/Work/Web Development/Websites/enlite-prime_v19/enlite-prime/node_modules/babel-loader/lib/cache.js:3:103)
    at _next (/mnt/d/Work/Web Development/Websites/enlite-prime_v19/enlite-prime/node_modules/babel-loader/lib/cache.js:5:194)
    at /mnt/d/Work/Web Development/Websites/enlite-prime_v19/enlite-prime/node_modules/babel-loader/lib/cache.js:5:364
    at new Promise (<anonymous>)
    at /mnt/d/Work/Web Development/Websites/enlite-prime_v19/enlite-prime/node_modules/babel-loader/lib/cache.js:5:97
kkbh8khc

kkbh8khc1#

这是因为节点v17具有不同的SSL提供程序。

  • 通过nvm安装节点v16并重新安装node_modules(此处提供说明)
  • 使用传统openssl提供程序运行v17:
  • Mac/Linux系统:x1个内存2个内存1个
  • 窗口:set NODE_OPTIONS=--openssl-legacy-provider

相关问题