icestark icon indicating copy to clipboard operation
icestark copied to clipboard

error:0308010C:digital envelope routines::unsupported

Open xmsz opened this issue 2 years ago • 2 comments

Do you want to request a feature or report a bug? bug

What is the current behavior?


> @cool-qi-client/[email protected] start
> build-scripts start

build-scripts 1.3.0
                                         10% buildingi 「wds」: Project is running at http://0.0.0.0:3333/
i 「wds」: webpack output is served from undefined
i 「wds」: Content not from webpack is served from C:\Users\xmsz\code\cool-qi-client-modules\apps\api-explorer\dist
node:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (C:\Users\xmsz\code\cool-qi-client-modules\node_modules\.pnpm\[email protected]\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (C:\Users\xmsz\code\cool-qi-client-modules\node_modules\.pnpm\[email protected]\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (C:\Users\xmsz\code\cool-qi-client-modules\node_modules\.pnpm\[email protected]\node_modules\webpack\lib\NormalModule.js:471:10)
    at C:\Users\xmsz\code\cool-qi-client-modules\node_modules\.pnpm\[email protected]\node_modules\webpack\lib\NormalModule.js:503:5
    at C:\Users\xmsz\code\cool-qi-client-modules\node_modules\.pnpm\[email protected]\node_modules\webpack\lib\NormalModule.js:358:12
    at C:\Users\xmsz\code\cool-qi-client-modules\node_modules\.pnpm\[email protected]\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\Users\xmsz\code\cool-qi-client-modules\node_modules\.pnpm\[email protected]\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at Array.<anonymous> (C:\Users\xmsz\code\cool-qi-client-modules\node_modules\.pnpm\[email protected]\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (C:\Users\xmsz\code\cool-qi-client-modules\node_modules\.pnpm\[email protected]\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
    at C:\Users\xmsz\code\cool-qi-client-modules\node_modules\.pnpm\[email protected]\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
    at C:\Users\xmsz\code\cool-qi-client-modules\node_modules\.pnpm\[email protected]\node_modules\graceful-fs\graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.16.0

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

What is the expected behavior?

如何解决这个错误 是因为node版本太高了吗 还是node-sass版本过高

xmsz avatar Apr 19 '23 07:04 xmsz

先看下工程配置,可能的原因是 hash 算法在新版的 webpack 下是有更新的

ClarkXia avatar Apr 19 '23 07:04 ClarkXia

先看下工程配置,可能的原因是 hash 算法在新版的 webpack 下是有更新的

我按照这个教程 https://micro-frontends.ice.work/docs/guide/micro-module#react-%E9%A1%B9%E7%9B%AE%E4%B8%AD%E4%BD%BF%E7%94%A8

  npm i -g @appworks/cli
 appworks init component @icedesign/template-icestark-module
 pnpm i  
 npm run start

其他没有改动

xmsz avatar Apr 19 '23 07:04 xmsz