5:32:00 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
5:31:57 PM: Netlify Build
5:31:57 PM: ────────────────────────────────────────────────────────────────
5:31:57 PM:
5:31:57 PM: ❯ Version
5:31:57 PM: @netlify/build 29.20.6
5:31:57 PM:
5:31:57 PM: ❯ Flags
5:31:57 PM: baseRelDir: true
5:31:57 PM: buildId: 64e351c834dadc0b136972aa
5:31:57 PM: deployId: 64e351c834dadc0b136972ac
5:31:57 PM:
5:31:57 PM: ❯ Current directory
5:31:57 PM: /opt/build/repo
5:31:57 PM:
5:31:57 PM: ❯ Config file
5:31:57 PM: No config file was defined: using default values.
5:31:57 PM:
5:31:57 PM: ❯ Context
5:31:57 PM: production
5:31:57 PM:
5:31:57 PM: Build command from Netlify app
5:31:57 PM: ────────────────────────────────────────────────────────────────
5:31:57 PM:
5:31:57 PM: $ CI=‘’ npm run build
5:31:57 PM: > fb-project@0.1.0 build
5:31:57 PM: > vue-cli-service build
5:31:57 PM: Browserslist: caniuse-lite is outdated. Please run:
5:31:57 PM: npx browserslist@latest --update-db
5:31:57 PM: Why you should do it regularly: GitHub - browserslist/browserslist: 🦔 Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-preset-env
5:31:57 PM: - Building for production…
5:31:58 PM: Error: error:0308010C:digital envelope routines::unsupported
5:31:58 PM: at new Hash (node:internal/crypto/hash:69:19)
5:31:58 PM: at Object.createHash (node:crypto:133:10)
5:31:58 PM: at module.exports (/opt/build/repo/node_modules/webpack/lib/util/createHash.js:135:53)
5:31:58 PM: at NormalModule._initBuildHash (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:417:16)
5:31:58 PM: at handleParseError (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:471:10)
5:31:58 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:503:5
5:31:58 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:358:12
5:31:58 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:373:3
5:31:58 PM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
5:31:58 PM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
5:31:58 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:236:3
5:31:58 PM: at runSyncOrAsync (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
5:31:58 PM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
5:31:58 PM: at Array. (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
5:31:58 PM: at Storage.finished (/opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
5:31:58 PM: at /opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
5:31:58 PM: Browserslist: caniuse-lite is outdated. Please run:
5:31:58 PM: npx browserslist@latest --update-db
5:31:58 PM: Why you should do it regularly: GitHub - browserslist/browserslist: 🦔 Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-preset-env
5:31:59 PM: /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:114
5:31:59 PM: throw e;
5:31:59 PM: ^
5:31:59 PM: Error: error:0308010C:digital envelope routines::unsupported
5:31:59 PM: at new Hash (node:internal/crypto/hash:69:19)
5:31:59 PM: at Object.createHash (node:crypto:133:10)
5:31:59 PM: at module.exports (/opt/build/repo/node_modules/webpack/lib/util/createHash.js:135:53)
5:31:59 PM: at NormalModule._initBuildHash (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:417:16)
5:31:59 PM: at handleParseError (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:471:10)
5:31:59 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:503:5
5:31:59 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:358:12
5:31:59 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:373:3
5:31:59 PM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
5:31:59 PM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
5:31:59 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:236:3
5:31:59 PM: at context.callback (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
5:31:59 PM: at /opt/build/repo/node_modules/cache-loader/dist/index.js:147:7
5:31:59 PM: at /opt/build/repo/node_modules/graceful-fs/graceful-fs.js:61:14
5:31:59 PM: at FSReqCallback.oncomplete (node:fs:200:23) {
5:31:59 PM: opensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization error’ ],
5:31:59 PM: library: ‘digital envelope routines’,
5:31:59 PM: reason: ‘unsupported’,
5:31:59 PM: code: ‘ERR_OSSL_EVP_UNSUPPORTED’
5:31:59 PM: }
5:31:59 PM: Node.js v18.17.1
5:31:59 PM:
5:31:59 PM: build.command failed
5:31:59 PM: ────────────────────────────────────────────────────────────────
5:31:59 PM:
5:31:59 PM: Error message
5:31:59 PM: Command failed with exit code 1: CI=‘’ npm run build
5:31:59 PM:
5:31:59 PM: Error location
5:31:59 PM: In Build command from Netlify app:
5:31:59 PM: CI=‘’ npm run build
5:31:59 PM:
5:31:59 PM: Resolved config
5:31:59 PM: build:
5:31:59 PM: command: CI=‘’ npm run build
5:31:59 PM: commandOrigin: ui
5:31:59 PM: publish: /opt/build/repo/build
5:31:59 PM: publishOrigin: ui
5:32:00 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
5:32:00 PM: Failing build: Failed to build site
5:32:01 PM: Finished processing build request in 1m0.547s
Hi @Monishobaid,
Thanks for reaching out and welcome to Netlify’s Support Forums!
I’m seeing in your deploy, an error here.
11:17:44 PM: Error: error:0308010C:digital envelope routines::unsupported
11:17:44 PM: at new Hash (node:internal/crypto/hash:71:19)
11:17:44 PM: at Object.createHash (node:crypto:133:10)
11:17:44 PM: at module.exports (/opt/build/repo/node_modules/webpack/lib/util/createHash.js:135:53)
11:17:44 PM: at NormalModule._initBuildHash (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:417:16)
11:17:44 PM: at handleParseError (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:471:10)
11:17:44 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:503:5
11:17:44 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:358:12
11:17:44 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:373:3
11:17:44 PM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
11:17:44 PM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
11:17:45 PM: /opt/build/repo/node_modules/react-scripts/scripts/build.js:19
11:17:45 PM: throw err;
11:17:45 PM: ^
11:17:45 PM: Error: error:0308010C:digital envelope routines::unsupported
11:17:45 PM: at new Hash (node:internal/crypto/hash:71:19)
11:17:45 PM: at Object.createHash (node:crypto:133:10)
11:17:45 PM: at module.exports (/opt/build/repo/node_modules/webpack/lib/util/createHash.js:135:53)
11:17:45 PM: at NormalModule._initBuildHash (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:417:16)
11:17:45 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:452:10
11:17:45 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:323:13
11:17:45 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:367:11
11:17:45 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:233:18
11:17:45 PM: at context.callback (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
11:17:45 PM: at /opt/build/repo/node_modules/babel-loader/lib/index.js:59:103 {
11:17:45 PM: opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
11:17:45 PM: library: 'digital envelope routines',
11:17:45 PM: reason: 'unsupported',
11:17:45 PM: code: 'ERR_OSSL_EVP_UNSUPPORTED'
Here’s a Stackoverflow post with a similar issue:
Can you successfully perform a local build? For a smoother experience, we suggest adjusting the build dependencies configuration on Netlify to closely mirror your local build environment.