Dear Netlify Support Team,
I hope this message finds you well. I am writing to seek assistance with a recent build failure issue I encountered while deploying my website on Netlify.
[
2:26:52 PM: Netlify Build
2:26:52 PM: ────────────────────────────────────────────────────────────────
2:26:52 PM:
2:26:52 PM: ❯ Version
2:26:52 PM: @netlify/build 29.17.4
2:26:52 PM:
2:26:52 PM: ❯ Flags
2:26:52 PM: baseRelDir: true
2:26:52 PM: buildId: 64ce15b8f1f18225c5e8a939
2:26:52 PM: deployId: 64ce15b8f1f18225c5e8a93b
2:26:52 PM:
2:26:52 PM: ❯ Current directory
2:26:52 PM: /opt/build/repo
2:26:52 PM:
2:26:52 PM: ❯ Config file
2:26:52 PM: No config file was defined: using default values.
2:26:52 PM:
2:26:52 PM: ❯ Context
2:26:52 PM: production
2:26:52 PM:
2:26:52 PM: Build command from Netlify app
2:26:52 PM: ────────────────────────────────────────────────────────────────
2:26:52 PM:
2:26:52 PM: $ npm run build
2:26:52 PM: > everest@0.1.0 build
2:26:52 PM: > react-scripts build
2:26:53 PM: Creating an optimized production build…
2:26:53 PM: Error: error:0308010C:digital envelope routines::unsupported
2:26:53 PM: at new Hash (node:internal/crypto/hash:69:19)
2:26:53 PM: at Object.createHash (node:crypto:133:10)
2:26:53 PM: at module.exports (/opt/build/repo/node_modules/webpack/lib/util/createHash.js:90:53)
2:26:53 PM: at NormalModule._initBuildHash (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:386:16)
2:26:53 PM: at handleParseError (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:434:10)
2:26:55 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)
2:26:53 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:466:5
2:26:53 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:327:12
2:26:53 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:373:3
2:26:53 PM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
2:26:53 PM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
2:26:53 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:236:3
2:26:53 PM: at runSyncOrAsync (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
2:26:53 PM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
2:26:53 PM: at Array. (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
2:26:53 PM: at Storage.finished (/opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
2:26:53 PM: at /opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
2:26:54 PM: /opt/build/repo/node_modules/react-scripts/scripts/build.js:19
2:26:54 PM: throw err;
2:26:54 PM: ^
2:26:54 PM: Error: error:0308010C:digital envelope routines::unsupported
2:26:54 PM: at new Hash (node:internal/crypto/hash:69:19)
2:26:54 PM: at Object.createHash (node:crypto:133:10)
2:26:54 PM: at module.exports (/opt/build/repo/node_modules/webpack/lib/util/createHash.js:90:53)
2:26:54 PM: at NormalModule._initBuildHash (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:386:16)
2:26:54 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:418:10
2:26:54 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:293:13
2:26:54 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:367:11
2:26:54 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:233:18
2:26:54 PM: at context.callback (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
2:26:54 PM: at /opt/build/repo/node_modules/babel-loader/lib/index.js:51:103 {
2:26:54 PM: opensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization error’ ],
2:26:54 PM: library: ‘digital envelope routines’,
2:26:54 PM: reason: ‘unsupported’,
2:26:54 PM: code: ‘ERR_OSSL_EVP_UNSUPPORTED’
2:26:54 PM: }
2:26:54 PM: Node.js v18.17.0
2:26:54 PM:
2:26:54 PM: build.command failed
2:26:54 PM: ────────────────────────────────────────────────────────────────
2:26:54 PM:
2:26:54 PM: Error message
2:26:54 PM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
2:26:54 PM:
2:26:54 PM: Error location
2:26:54 PM: In Build command from Netlify app:
2:26:54 PM: npm run build
2:26:54 PM:
2:26:54 PM: Resolved config
2:26:54 PM: build:
2:26:54 PM: command: npm run build
2:26:54 PM: commandOrigin: ui
2:26:54 PM: publish: /opt/build/repo/build
2:26:54 PM: publishOrigin: ui
2:26:55 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
2:26:55 PM: Failing build: Failed to build site
2:26:56 PM: Finished processing build request in 38.019s
]
I am using the following configuration for the build:
- Netlify Build Version: @netlify/build 29.17.4
- Build Context: Production
- Build Command:
npm run build
- Node.js Version: v18.17.0
- Project Directory: /opt/build/repo
The error seems to be related to unsupported digital envelope routines. I have reviewed my project’s dependencies and build configuration, but I haven’t been able to pinpoint the exact cause of this issue.
I have already tried the following troubleshooting steps:
- Checked and confirmed the compatibility of my dependencies with Node.js v18.17.0.
- Reviewed and ensured that the required packages are correctly installed in my project.
- Verified that there are no issues with my project’s build script.
Despite these efforts, the build continues to fail with the same error message.
I kindly request your assistance in diagnosing and resolving this issue. If there are any specific steps or configurations that I should adjust to ensure a successful build, please let me know. Your guidance and expertise in resolving this matter would be greatly appreciated.
If you need any additional information, such as my project’s source code, package.json, or build script, please feel free to ask. I am eager to get my website up and running on Netlify as soon as possible.
Thank you for your time and support. I look forward to your response.
Best regards,
Mironshoh
shaxobiddinovmironshoh@gmail.com