美文网首页
编译报错:error:0308010C:digital enve

编译报错:error:0308010C:digital enve

作者: 蓝不蓝编程 | 来源:发表于2022-12-09 07:28 被阅读0次

    vue项目编译报错:

    10% building 2/5 modules 3 active /Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/webpack/hot/dev-server.jsError: error:0308010C:digital envelope routines::unsupported
        at new Hash (node:internal/crypto/hash:71:19)
        at Object.createHash (node:crypto:140:10)
        at module.exports (/Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/webpack/lib/util/createHash.js:135:53)
        at NormalModule._initBuildHash (/Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/webpack/lib/NormalModule.js:417:16)
        at handleParseError (/Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/webpack/lib/NormalModule.js:471:10)
        at /Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/webpack/lib/NormalModule.js:503:5
        at /Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/webpack/lib/NormalModule.js:358:12
        at /Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/loader-runner/lib/LoaderRunner.js:373:3
        at iterateNormalLoaders (/Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
        at iterateNormalLoaders (/Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
        at /Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/loader-runner/lib/LoaderRunner.js:236:3
        at runSyncOrAsync (/Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
        at iterateNormalLoaders (/Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
        at Array.<anonymous> (/Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
        at Storage.finished (/Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
        at /Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
    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:140:10)
        at module.exports (/Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/webpack/lib/util/createHash.js:135:53)
        at NormalModule._initBuildHash (/Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/webpack/lib/NormalModule.js:417:16)
        at handleParseError (/Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/webpack/lib/NormalModule.js:471:10)
        at /Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/webpack/lib/NormalModule.js:503:5
        at /Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/webpack/lib/NormalModule.js:358:12
        at /Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/loader-runner/lib/LoaderRunner.js:373:3
        at iterateNormalLoaders (/Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
        at Array.<anonymous> (/Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
        at Storage.finished (/Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
        at /Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
        at /Users/jerry/projects/mine/gitee/demos/blogs/blog_client/blog_vue/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'
    }
    

    解决方法:

    export NODE_OPTIONS=--openssl-legacy-provider
    

    相关文章

      网友评论

          本文标题:编译报错:error:0308010C:digital enve

          本文链接:https://www.haomeiwen.com/subject/fziofdtx.html