Uniswap/deploy-v3

Errors with Node version >16

Opened this issue · 1 comments

When running the script on Node versions 17 or 19, I get the following error on macOS:

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:140:10)
    at hashOf (/Users/user/dev/3rdPartyContractsDeploy/uniswap-v3/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:37:1890023)
    at ncc (/Users/user/dev/3rdPartyContractsDeploy/uniswap-v3/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:37:1894690)
    at runCmd (/Users/user/dev/3rdPartyContractsDeploy/uniswap-v3/node_modules/@vercel/ncc/dist/ncc/cli.js.cache.js:1:52268)
    at 819 (/Users/user/dev/3rdPartyContractsDeploy/uniswap-v3/node_modules/@vercel/ncc/dist/ncc/cli.js.cache.js:1:48838)
    at __webpack_require__ (/Users/user/dev/3rdPartyContractsDeploy/uniswap-v3/node_modules/@vercel/ncc/dist/ncc/cli.js.cache.js:1:59076)
    at /Users/user/dev/3rdPartyContractsDeploy/uniswap-v3/node_modules/@vercel/ncc/dist/ncc/cli.js.cache.js:1:59288
    at /Users/user/dev/3rdPartyContractsDeploy/uniswap-v3/node_modules/@vercel/ncc/dist/ncc/cli.js.cache.js:1:59349
    at Object.<anonymous> (/Users/user/dev/3rdPartyContractsDeploy/uniswap-v3/node_modules/@vercel/ncc/dist/ncc/cli.js:8:28) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
error Command failed with exit code 1.

More discussion of this error.

Fixes:

  • Using nvm to deploy using version 16.
  • Run export NODE_OPTIONS=--openssl-legacy-provider prior to running script

I confirm this