dabit3 / polygon-ethereum-nextjs-marketplace

A full stack digital marketplace running on Ethereum with Polygon & Next.js
MIT License
1.3k stars 878 forks source link

after npm run dev, got Error: error:0308010C:digital envelope routines::unsupported #70

Open Evelyn6511 opened 1 year ago

Evelyn6511 commented 1 year ago

Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:71:19) at Object.createHash (node:crypto:133:10) at BulkUpdateDecorator.hashFactory (D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:133863:18) at BulkUpdateDecorator.update (D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:133764:50) at OriginalSource.updateHash (D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack-sources2\index.js:1:21039) at NormalModule._initBuildHash (D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:65771:17) at handleParseResult (D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:65837:10) at D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:65929:4 at processResult (D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:65646:11) at D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:65710:5 Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:71:19) at Object.createHash (node:crypto:133:10) at BulkUpdateDecorator.hashFactory (D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:133863:18) at BulkUpdateDecorator.update (D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:133764:50) at OriginalSource.updateHash (D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack-sources2\index.js:1:21039) at NormalModule._initBuildHash (D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:65771:17) at handleParseResult (D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:65837:10) at D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:65929:4 at processResult (D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:65646:11) at D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:65710:5 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 BulkUpdateDecorator.hashFactory (D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:133863:18) at BulkUpdateDecorator.update (D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:133764:50) at OriginalSource.updateHash (D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack-sources2\index.js:1:21039) at NormalModule._initBuildHash (D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:65771:17) at handleParseResult (D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:65837:10) at D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:65929:4 at processResult (D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:65646:11) at D:\reactproject\polygon-ethereum-nextjs-marketplace-main\node_modules\next\dist\compiled\webpack\bundle5.js:65710:5 { opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED' }

L-KH commented 1 year ago

You can try:

  1. Enable legacy OpenSSL provider.

On Unix-like (Linux, macOS, Git bash, etc.):

export NODE_OPTIONS=--openssl-legacy-provider On Windows command prompt:

set NODE_OPTIONS=--openssl-legacy-provider On PowerShell:

$env:NODE_OPTIONS = "--openssl-legacy-provider"

Nickyk05 commented 1 year ago

Visit the official Eth page to rectify your issues.
Note: you can also initiate a chat with the support agent for further assistance.