-1

I forked a Nextjs Project from the GitHub but it is not running running locally. GitHub Repository that I forked: Github Link

Getting the following error in console:- `

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:138:10)
    at BulkUpdateDecorator.hashFactory (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:130015:18)
    at BulkUpdateDecorator.update (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:129917:50)
    at OriginalSource.updateHash (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack-sources2/index.js:1:19148)
    at NormalModule._initBuildHash (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:62350:17)
    at handleParseResult (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:62415:10)
    at /Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:62506:4
    at processResult (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:62229:11)
    at /Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:62289:5
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:138:10)
    at BulkUpdateDecorator.hashFactory (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:130015:18)
    at BulkUpdateDecorator.update (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:129917:50)
    at OriginalSource.updateHash (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack-sources2/index.js:1:19148)
    at NormalModule._initBuildHash (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:62350:17)
    at handleParseResult (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:62415:10)
    at /Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:62506:4
    at processResult (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:62229:11)
    at /Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:62289:5
node:internal/crypto/hash:69
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:138:10)
    at BulkUpdateDecorator.hashFactory (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:130015:18)
    at BulkUpdateDecorator.update (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:129917:50)
    at OriginalSource.updateHash (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack-sources2/index.js:1:19148)
    at NormalModule._initBuildHash (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:62350:17)
    at handleParseResult (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:62415:10)
    at /Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:62506:4
    at processResult (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:62229:11)
    at /Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:62289:5
    at /Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:27517:3
    at iterateNormalLoaders (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:27343:10)
    at Array.<anonymous> (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:27334:4)
    at runCallbacks (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:16938:15)
    at /Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:17111:4
    at /Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle5.js:26311:16 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v20.5.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

`

After forking the the project I ran yarn install , then tried running the project using yarn dev , but got the above error, then tried using web3 pack by changing webpack5 to true in next.config.js but still got the error.

Tried Doing the Following:

1: Downgraded node to v16.

  1. Enabled legacy OpenSSL provider. export NODE_OPTIONS=--openssl-legacy-provider

Now getting the following error after running npm run dev


> betterfund@0.1.0 dev
> next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - Using webpack 4. Reason: future.webpack5 option disabled https://nextjs.org/docs/messages/webpack5
event - compiled successfully
event - build page: /
wait  - compiling...
node:internal/fs/utils:677
    throw err;
    ^

TypeError [ERR_INVALID_ARG_VALUE]: The argument 'path' must be a string or Uint8Array without null bytes. Received '/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/.next/static/webpack/Jҟݦ��\x00!l�֎��n.hot-update.json...
    at Object.open (node:fs:546:10)
    at Object.writeFile (node:fs:2137:6)
    at writeOut (/Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle4.js:74569:30)
    at /Users/dawoodtrumboo/Downloads/betterfund-crowdfunding-in-blockchain-main/node_modules/next/dist/compiled/webpack/bundle4.js:55641:20
    at FSReqCallback.oncomplete (node:fs:188:23) {
  code: 'ERR_INVALID_ARG_VALUE'```
TylerH
  • 20,799
  • 66
  • 75
  • 101
  • Does this answer your question? [Error message "error:0308010C:digital envelope routines::unsupported"](https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported) – Fabio Nettis Aug 09 '23 at 12:20

0 Answers0