0

Heroku asks that I specify version in package.json, which I have done:

"engines": {
    "node": "16.16.0",
    "npm": "8.11.0"
  }

I would normally have put the x after version, but read that specifying the exact version may help.

Below are the errors I get with the build:

-----> Build
remote:        Detected both "build" and "heroku-postbuild" scripts
remote:        Running heroku-postbuild
remote:
remote:        > wino@1.0.0 heroku-postbuild
remote:        > npm run build
remote:
remote:
remote:        > wino@1.0.0 build
remote:        > cd client && npm run build
remote:
remote:
remote:        > wino@0.1.0 build
remote:        > react-scripts build
remote:
remote:        Creating an optimized production build...
remote: Error: error:0308010C:digital envelope routines::unsupported
remote:     at new Hash (node:internal/crypto/hash:71:19)
remote:     at Object.createHash (node:crypto:140:10)
remote:     at module.exports (/tmp/build_25ff6fd3/client/node_modules/webpack/lib/util/createHash.js:90:53)
remote:     at NormalModule._initBuildHash (/tmp/build_25ff6fd3/client/node_modules/webpack/lib/NormalModule.js:401:16)
remote:     at handleParseError (/tmp/build_25ff6fd3/client/node_modules/webpack/lib/NormalModule.js:449:10)
remote:     at /tmp/build_25ff6fd3/client/node_modules/webpack/lib/NormalModule.js:481:5
remote:     at /tmp/build_25ff6fd3/client/node_modules/webpack/lib/NormalModule.js:342:12
remote:     at /tmp/build_25ff6fd3/client/node_modules/loader-runner/lib/LoaderRunner.js:373:3
remote:     at iterateNormalLoaders (/tmp/build_25ff6fd3/client/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
remote:     at iterateNormalLoaders (/tmp/build_25ff6fd3/client/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
remote:     at /tmp/build_25ff6fd3/client/node_modules/loader-runner/lib/LoaderRunner.js:236:3
remote:     at runSyncOrAsync (/tmp/build_25ff6fd3/client/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
remote:     at iterateNormalLoaders (/tmp/build_25ff6fd3/client/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
remote:     at Array.<anonymous> (/tmp/build_25ff6fd3/client/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
remote:     at Storage.finished (/tmp/build_25ff6fd3/client/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:43:16)
remote:     at /tmp/build_25ff6fd3/client/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:79:9
remote: /tmp/build_25ff6fd3/client/node_modules/react-scripts/scripts/build.js:19
remote:   throw err;
remote:   ^
remote:
remote: Error: error:0308010C:digital envelope routines::unsupported
remote:     at new Hash (node:internal/crypto/hash:71:19)
remote:     at Object.createHash (node:crypto:140:10)
remote:     at module.exports (/tmp/build_25ff6fd3/client/node_modules/webpack/lib/util/createHash.js:90:53)
remote:     at NormalModule._initBuildHash (/tmp/build_25ff6fd3/client/node_modules/webpack/lib/NormalModule.js:401:16)
remote:     at /tmp/build_25ff6fd3/client/node_modules/webpack/lib/NormalModule.js:433:10
remote:     at /tmp/build_25ff6fd3/client/node_modules/webpack/lib/NormalModule.js:308:13
remote:     at /tmp/build_25ff6fd3/client/node_modules/loader-runner/lib/LoaderRunner.js:367:11
remote:     at /tmp/build_25ff6fd3/client/node_modules/loader-runner/lib/LoaderRunner.js:233:18
remote:     at context.callback (/tmp/build_25ff6fd3/client/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
remote:     at /tmp/build_25ff6fd3/client/node_modules/babel-loader/lib/index.js:51:103 {
remote:   opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
remote:   library: 'digital envelope routines',
remote:   reason: 'unsupported',
remote:   code: 'ERR_OSSL_EVP_UNSUPPORTED'
remote: }
remote:
remote: Node.js v19.2.0
remote:
remote: -----> Build failed

Also, I have been getting errors about upgrading the stack to Heroku-22. I was working on that, but it seems to be trying to build to that stack anyway so I don't think that's the issue. Thanks in advance for the help!

torek
  • 448,244
  • 59
  • 642
  • 775
elainecadman
  • 69
  • 2
  • 8

0 Answers0