When i try to deploy a website in vercel that i edited and forked from another person's github repo it isn't working but it works on localhost with yarn run. can someone help me with this the error code shows as following. Its nextJs and react code BTW!
Failed to compile. HookWebpackError: error:0308010C:digital envelope routines::unsupported at makeWebpackError (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:45539:9) at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:29467:12 at eval (eval at create (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:140927:10), :105:1) -- inner error -- Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:69:19) at Object.createHash (node:crypto:133:10) at getHashDigest (/vercel/path0/node_modules/next/dist/compiled/loader-utils/index.js:1:29141) at /vercel/path0/node_modules/next/dist/compiled/loader-utils/index.js:1:31472 at String.replace () at Object.interpolateName (/vercel/path0/node_modules/next/dist/compiled/loader-utils/index.js:1:31381) at /vercel/path0/node_modules/next/dist/build/webpack/plugins/copy-file-plugin.js:41:51 caused by plugins in Compilation.hooks.processAssets Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:69:19) at Object.createHash (node:crypto:133:10) at getHashDigest (/vercel/path0/node_modules/next/dist/compiled/loader-utils/index.js:1:29141) at /vercel/path0/node_modules/next/dist/compiled/loader-utils/index.js:1:31472 at String.replace () at Object.interpolateName (/vercel/path0/node_modules/next/dist/compiled/loader-utils/index.js:1:31381) at /vercel/path0/node_modules/next/dist/build/webpack/plugins/copy-file-plugin.js:41:51
Build failed because of webpack errors error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Error: Command "yarn run build" exited with 1
I tried to deploy on vercel and i was expecting it to work because it works perfectly fine on local host.