opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], 1:19:00 PM: library: 'digital envelope routines', 1:19:00 PM: reason: 'unsupported', 1:19:00 PM: code: 'ERR_OSSL_EVP_UNSUPPORTED' 1:19:00 PM: }

1:19:02 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
1:18:58 PM: Netlify Build
1:18:58 PM: ────────────────────────────────────────────────────────────────
1:18:58 PM: ​
1:18:58 PM: ❯ Version
1:18:58 PM: @netlify/build 29.19.0
1:18:58 PM: ​
1:18:58 PM: ❯ Flags
1:18:58 PM: baseRelDir: true
1:18:58 PM: buildId: 64d9dc37555a7613ec59c137
1:18:58 PM: deployId: 64d9dc37555a7613ec59c139
1:18:58 PM: ​
1:18:58 PM: ❯ Current directory
1:18:58 PM: /opt/build/repo
1:18:58 PM: ​
1:18:58 PM: ❯ Config file
1:18:58 PM: No config file was defined: using default values.
1:18:58 PM: ​
1:18:58 PM: ❯ Context
1:18:58 PM: production
1:18:58 PM: ​
1:18:58 PM: Build command from Netlify app
1:18:58 PM: ────────────────────────────────────────────────────────────────
1:18:58 PM: ​
1:18:58 PM: $ npm run build
1:18:58 PM: > my-techmechindustry1@0.1.0 build
1:18:58 PM: > react-scripts build
1:18:59 PM: Creating an optimized production build…
1:18:59 PM: Error: error:0308010C:digital envelope routines::unsupported
1:18:59 PM: at new Hash (node:internal/crypto/hash:69:19)
1:18:59 PM: at Object.createHash (node:crypto:133:10)
1:18:59 PM: at module.exports (/opt/build/repo/node_modules/webpack/lib/util/createHash.js:90:53)
1:18:59 PM: at NormalModule._initBuildHash (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:386:16)
1:18:59 PM: at handleParseError (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:434:10)
1:18:59 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:466:5
1:18:59 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:327:12
1:18:59 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:373:3
1:18:59 PM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
1:18:59 PM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
1:18:59 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:236:3
1:18:59 PM: at runSyncOrAsync (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
1:18:59 PM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
1:18:59 PM: at Array. (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
1:18:59 PM: at Storage.finished (/opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
1:18:59 PM: at /opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
1:19:00 PM: /opt/build/repo/node_modules/react-scripts/scripts/build.js:19
1:19:00 PM: throw err;
1:19:00 PM: ^
1:19:00 PM: Error: error:0308010C:digital envelope routines::unsupported
1:19:00 PM: at new Hash (node:internal/crypto/hash:69:19)
1:19:00 PM: at Object.createHash (node:crypto:133:10)
1:19:00 PM: at module.exports (/opt/build/repo/node_modules/webpack/lib/util/createHash.js:90:53)
1:19:00 PM: at NormalModule._initBuildHash (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:386:16)
1:19:00 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:418:10
1:19:00 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:293:13
1:19:00 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:367:11
1:19:00 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:233:18
1:19:00 PM: at context.callback (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
1:19:00 PM: at /opt/build/repo/node_modules/babel-loader/lib/index.js:51:103 {
1:19:00 PM: opensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization error’ ],
1:19:00 PM: library: ‘digital envelope routines’,
1:19:00 PM: reason: ‘unsupported’,
1:19:00 PM: code: ‘ERR_OSSL_EVP_UNSUPPORTED’
1:19:00 PM: }
1:19:00 PM: Node.js v18.17.1
1:19:00 PM: ​
1:19:00 PM: build.command failed
1:19:00 PM: ────────────────────────────────────────────────────────────────
1:19:00 PM: ​
1:19:00 PM: Error message
1:19:00 PM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
1:19:00 PM: ​
1:19:00 PM: Error location
1:19:00 PM: In Build command from Netlify app:
1:19:00 PM: npm run build
1:19:00 PM: ​
1:19:00 PM: Resolved config
1:19:00 PM: build:
1:19:00 PM: command: npm run build
1:19:00 PM: commandOrigin: ui
1:19:00 PM: publish: /opt/build/repo/build
1:19:00 PM: publishOrigin: ui
1:19:01 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
1:19:02 PM: Failing build: Failed to build site
1:19:02 PM: Finished processing build request in 38.095s

Hiya, sorry you are having trouble with your build.

This Support Guide contains a ton of useful debugging tips that can likely help you solve your problem :slight_smile: Additionally, this Support Guide houses all of our resources for debugging build and deploy issues.

We also recommend trying to search the forums with the build error you encountered - it’s likely your question was already asked by someone else!

If you are still having problems, please provide as much information as you can on what you have already tried, what your build settings are, your package.json, etc. Thanks!