I'm trying to deploy my vuejs project to Netlify, but it never success
the error message :
Failed during stage 'building site': Build script returned non-zero exit code: 2
here the deploy log
4:12:42 PM: build-image version: 20e1f1f500e4cbad9ea8a99bd40807bef3093551 (focal)
4:12:42 PM: buildbot version: 77071362d8e2c4892a900c59914f4f5b20867e29
4:12:43 PM: Fetching cached dependencies
4:12:43 PM: Failed to fetch cache, continuing with build
4:12:43 PM: Starting to prepare the repo for build
4:12:43 PM: No cached dependencies found. Cloning fresh repo
4:12:43 PM: git clone --filter=blob:none https://github.com/HyuuuRiie/yu-todo
4:12:43 PM: Preparing Git Reference refs/heads/main
4:12:45 PM: Starting to install dependencies
4:12:45 PM: Python version set to 3.8
4:12:45 PM: Attempting Ruby version 2.7.2, read from environment
4:12:45 PM: Using Ruby version 2.7.2
4:12:46 PM: Started restoring cached go cache
4:12:46 PM: Finished restoring cached go cache
4:12:47 PM: Installing Go version 1.19.12 (requested 1.19.x)
4:12:52 PM: go version go1.19.12 linux/amd64
4:12:52 PM: Using PHP version 8.0
4:12:53 PM: v18.17.0 is already installed.
4:12:53 PM: Now using node v18.17.0 (npm v9.6.7)
4:12:53 PM: Enabling Node.js Corepack
4:12:53 PM: Started restoring cached build plugins
4:12:53 PM: Finished restoring cached build plugins
4:12:53 PM: Started restoring cached corepack dependencies
4:12:53 PM: Finished restoring cached corepack dependencies
4:12:54 PM: No npm workspaces detected
4:12:54 PM: Started restoring cached node modules
4:12:54 PM: Finished restoring cached node modules
4:12:54 PM: Installing npm packages using npm version 9.6.7
4:12:55 PM: npm WARN EBADENGINE Unsupported engine {
4:12:55 PM: npm WARN EBADENGINE package: '@achrinza/node-ipc@9.2.2',
4:12:55 PM: npm WARN EBADENGINE required: { node: '8 || 10 || 12 || 14 || 16 || 17' },
4:12:55 PM: npm WARN EBADENGINE current: { node: 'v18.17.0', npm: '9.6.7' }
4:12:55 PM: npm WARN EBADENGINE }
4:12:58 PM: npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
4:12:58 PM: npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
4:12:59 PM: npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
4:12:59 PM: npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
4:12:59 PM: npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
4:12:59 PM: npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
4:13:00 PM: npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
4:13:00 PM: npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
4:13:05 PM: npm WARN deprecated html-webpack-plugin@3.2.0: 3.x is no longer supported
4:13:06 PM: npm WARN deprecated har-validator@5.1.5: this library is no longer supported
4:13:08 PM: npm WARN deprecated consolidate@0.15.1: Please upgrade to consolidate v1.0.0+ as it has been modernized with several long-awaited fixes implemented. Maintenance is supported by Forward Email at https://forwardemail.net ; follow/watch https://github.com/ladjs/consolidate for updates and release changelog
4:13:11 PM: npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
4:13:11 PM: npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
4:13:11 PM: npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
4:13:11 PM: npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
4:13:12 PM: npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
4:13:14 PM: npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
4:13:14 PM: npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
4:13:20 PM: added 1334 packages, and audited 1335 packages in 26s
4:13:20 PM: 1 package is looking for funding
4:13:20 PM: run `npm fund` for details
4:13:20 PM: 31 vulnerabilities (1 low, 4 moderate, 18 high, 8 critical)
4:13:20 PM: To address issues that do not require attention, run:
4:13:20 PM: npm audit fix
4:13:20 PM: To address all issues (including breaking changes), run:
4:13:20 PM: npm audit fix --force
4:13:20 PM: Run `npm audit` for details.
4:13:20 PM: npm packages installed
4:13:20 PM: Install dependencies script success
4:13:20 PM: Starting build script
4:13:21 PM: Detected 1 framework(s)
4:13:21 PM: vue at version 4.5.19
4:13:21 PM: Section completed: initializing
4:13:26 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
4:13:22 PM: Netlify Build
4:13:22 PM: ────────────────────────────────────────────────────────────────
4:13:22 PM:
4:13:22 PM: ❯ Version
4:13:22 PM: @netlify/build 29.17.4
4:13:22 PM:
4:13:22 PM: ❯ Flags
4:13:22 PM: baseRelDir: true
4:13:22 PM: buildId: 64ce1282842a6d265c97c5cc
4:13:22 PM: deployId: 64ce1282842a6d265c97c5ce
4:13:22 PM:
4:13:22 PM: ❯ Current directory
4:13:22 PM: /opt/build/repo
4:13:22 PM:
4:13:22 PM: ❯ Config file
4:13:22 PM: No config file was defined: using default values.
4:13:22 PM:
4:13:22 PM: ❯ Context
4:13:22 PM: production
4:13:22 PM:
4:13:22 PM: Build command from Netlify app
4:13:22 PM: ────────────────────────────────────────────────────────────────
4:13:22 PM:
4:13:22 PM: $ npm run build
4:13:23 PM: > yu-todo@0.1.0 build
4:13:23 PM: > vue-cli-service build
4:13:23 PM: - Building for production...
4:13:24 PM: Error: error:0308010C:digital envelope routines::unsupported
4:13:24 PM: at new Hash (node:internal/crypto/hash:69:19)
4:13:24 PM: at Object.createHash (node:crypto:133:10)
4:13:24 PM: at module.exports (/opt/build/repo/node_modules/webpack/lib/util/createHash.js:135:53)
4:13:24 PM: at NormalModule._initBuildHash (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:417:16)
4:13:24 PM: at handleParseError (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:471:10)
4:13:24 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:503:5
4:13:24 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:358:12
4:13:24 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:373:3
4:13:24 PM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
4:13:24 PM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
4:13:24 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:236:3
4:13:24 PM: at runSyncOrAsync (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
4:13:24 PM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
4:13:24 PM: at Array.<anonymous> (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
4:13:24 PM: at Storage.finished (/opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
4:13:24 PM: at /opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
4:13:24 PM: /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:114
4:13:24 PM: throw e;
4:13:24 PM: ^
4:13:24 PM: Error: error:0308010C:digital envelope routines::unsupported
4:13:24 PM: at new Hash (node:internal/crypto/hash:69:19)
4:13:24 PM: at Object.createHash (node:crypto:133:10)
4:13:24 PM: at module.exports (/opt/build/repo/node_modules/webpack/lib/util/createHash.js:135:53)
4:13:24 PM: at NormalModule._initBuildHash (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:417:16)
4:13:24 PM: at handleParseError (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:471:10)
4:13:24 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:503:5
4:13:24 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:358:12
4:13:24 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:373:3
4:13:24 PM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
4:13:24 PM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
4:13:24 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:236:3
4:13:24 PM: at context.callback (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
4:13:24 PM: at /opt/build/repo/node_modules/cache-loader/dist/index.js:147:7
4:13:24 PM: at /opt/build/repo/node_modules/graceful-fs/graceful-fs.js:61:14
4:13:24 PM: at FSReqCallback.oncomplete (node:fs:200:23) {
4:13:24 PM: opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
4:13:24 PM: library: 'digital envelope routines',
4:13:24 PM: reason: 'unsupported',
4:13:24 PM: code: 'ERR_OSSL_EVP_UNSUPPORTED'
4:13:24 PM: }
4:13:24 PM: Node.js v18.17.0
4:13:24 PM:
4:13:24 PM: build.command failed
4:13:24 PM: ────────────────────────────────────────────────────────────────
4:13:24 PM:
4:13:24 PM: Error message
4:13:24 PM: Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
4:13:24 PM:
4:13:24 PM: Error location
4:13:24 PM: In Build command from Netlify app:
4:13:24 PM: npm run build
4:13:24 PM:
4:13:24 PM: Resolved config
4:13:24 PM: build:
4:13:24 PM: command: npm run build
4:13:24 PM: commandOrigin: ui
4:13:24 PM: publish: /opt/build/repo/dist
4:13:24 PM: publishOrigin: ui
4:13:26 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
4:13:26 PM: Failing build: Failed to build site
4:13:27 PM: Finished processing build request in 44.18s
i have found this method and try it to my project, but still failed, i do not know what i have to do. if you ever get the same problem, please tell me how to solved it. I really appreciate every answer given. Thanks