Home
Support Forums

Deployment keeps on failing

Im am trying to deploy my site but it keeps on failing i don’t know why, though i have tried everything, below is my deployment log

1:03:31 PM: Build ready to start
1:03:33 PM: build-image version: fa439ad1ab9393b2c0d449d8d7c033927683f4b0
1:03:33 PM: build-image tag: v4.3.0
1:03:33 PM: buildbot version: f8ab12ca7c3f21ebc0108952d6158a612fbe3ad0
1:03:33 PM: Fetching cached dependencies
1:03:34 PM: Failed to fetch cache, continuing with build
1:03:34 PM: Starting to prepare the repo for build
1:03:34 PM: No cached dependencies found. Cloning fresh repo
1:03:34 PM: git clone https://github.com/thecodemensch/fintech-app
1:03:35 PM: Preparing Git Reference refs/heads/main
1:03:36 PM: Parsing package.json dependencies
1:03:37 PM: Different functions path detected, going to use the one specified in the Netlify configuration file: 'functions' versus 'functions/' in the Netlify UI
1:03:37 PM: Starting build script
1:03:37 PM: Installing dependencies
1:03:37 PM: Python version set to 2.7
1:03:38 PM: Downloading and installing node v16.7.0...
1:03:38 PM: Downloading https://nodejs.org/dist/v16.7.0/node-v16.7.0-linux-x64.tar.xz...
1:03:38 PM: Computing checksum with sha256sum
1:03:38 PM: Checksums matched!
1:03:41 PM: Now using node v16.7.0 (npm v7.20.3)
1:03:41 PM: Started restoring cached build plugins
1:03:41 PM: Finished restoring cached build plugins
1:03:42 PM: Attempting ruby version 2.7.2, read from environment
1:03:43 PM: Using ruby version 2.7.2
1:03:43 PM: Using PHP version 8.0
1:03:43 PM: Started restoring cached node modules
1:03:43 PM: Finished restoring cached node modules
1:03:44 PM: Installing NPM modules using NPM version 7.20.3
1:03:53 PM: npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
1:03:54 PM: npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
1:04:10 PM: added 890 packages, and audited 891 packages in 26s
1:04:10 PM: 102 packages are looking for funding
1:04:10 PM:   run `npm fund` for details
1:04:10 PM: 2 low severity vulnerabilities
1:04:10 PM: To address all issues (including breaking changes), run:
1:04:10 PM:   npm audit fix --force
1:04:10 PM: Run `npm audit` for details.
1:04:10 PM: NPM modules installed
1:04:11 PM: Started restoring cached go cache
1:04:11 PM: Finished restoring cached go cache
1:04:11 PM: go version go1.16.5 linux/amd64
1:04:11 PM: go version go1.16.5 linux/amd64
1:04:11 PM: Installing missing commands
1:04:11 PM: Verify run directory
1:04:12 PM: ​
1:04:12 PM: ────────────────────────────────────────────────────────────────
1:04:12 PM:   Netlify Build                                                 
1:04:12 PM: ────────────────────────────────────────────────────────────────
1:04:12 PM: ​
1:04:12 PM: ❯ Version
1:04:12 PM:   @netlify/build 18.4.1
1:04:12 PM: ​
1:04:12 PM: ❯ Flags
1:04:12 PM:   baseRelDir: true
1:04:12 PM:   buildId: 611f5acb4d6f970007850b88
1:04:12 PM:   deployId: 611f5acb4d6f970007850b8a
1:04:12 PM: ​
1:04:12 PM: ❯ Current directory
1:04:12 PM:   /opt/build/repo
1:04:12 PM: ​
1:04:12 PM: ❯ Config file
1:04:12 PM:   /opt/build/repo/netlify.toml
1:04:12 PM: ​
1:04:12 PM: ❯ Context
1:04:12 PM:   production
1:04:12 PM: ​
1:04:12 PM: ❯ Installing plugins
1:04:12 PM:    - @netlify/plugin-nextjs@3.8.0
1:04:45 PM: ​
1:04:45 PM: ❯ Loading plugins
1:04:45 PM:    - @netlify/plugin-nextjs@3.8.0 from Netlify app
1:04:46 PM: ​
1:04:46 PM: ────────────────────────────────────────────────────────────────
1:04:46 PM:   1. onPreBuild command from @netlify/plugin-nextjs             
1:04:46 PM: ────────────────────────────────────────────────────────────────
1:04:46 PM: ​
1:04:46 PM: Using Next.js 11.1.0
1:04:46 PM: Warning: support for Next.js >=11.1.0 is experimental
1:04:47 PM: info  - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
1:04:48 PM: The "target" config property must be one of "serverless", "experimental-serverless-trace". Building with "serverless" target.
1:04:49 PM: info  - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
1:04:49 PM: No Next.js cache to restore.
1:04:49 PM: ​
1:04:49 PM: (@netlify/plugin-nextjs onPreBuild completed in 3.3s)
1:04:49 PM: ​
1:04:49 PM: ────────────────────────────────────────────────────────────────
1:04:49 PM:   2. build.command from netlify.toml                            
1:04:49 PM: ────────────────────────────────────────────────────────────────
1:04:49 PM: ​
1:04:49 PM: $ CI= npm run build
1:04:50 PM: > fintech-app@0.1.0 build
1:04:50 PM: > next build
1:04:52 PM: info  - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
1:04:53 PM: info  - Checking validity of types...
1:04:56 PM: info  - Creating an optimized production build...
1:04:56 PM: (node:1708) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./2020/" in the "exports" field module resolution of the package at /opt/build/repo/node_modules/es-abstract/package.json.
1:04:56 PM: Update this package.json to use a subpath pattern like "./2020/*".
1:04:56 PM: (Use `node --trace-deprecation ...` to show where the warning was created)
1:04:56 PM: (node:1708) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./helpers/" in the "exports" field module resolution of the package at /opt/build/repo/node_modules/es-abstract/package.json.
1:04:56 PM: Update this package.json to use a subpath pattern like "./helpers/*".
1:04:57 PM: > [PWA] Compile client (static)
1:04:57 PM: > [PWA] Auto register service worker with: /opt/build/repo/node_modules/next-pwa/register.js
1:04:57 PM: > [PWA] Service worker: /opt/build/repo/public/sw.js
1:04:57 PM: > [PWA]   url: /sw.js
1:04:57 PM: > [PWA]   scope: /
1:04:57 PM: > [PWA] Fallback to precache routes when fetch failed from cache or network:
1:04:57 PM: > [PWA]   document (page): /_offline
1:04:57 PM: > [PWA]   image: /static/images/fallback.png
1:04:57 PM: > [PWA] Compile server
1:04:58 PM: info  - Using external babel configuration from /opt/build/repo/.babelrc
1:04:58 PM: info  - Using external babel configuration from /opt/build/repo/.babelrc
1:05:01 PM: info  - Using external babel configuration from /opt/build/repo/.babelrc
1:06:14 PM: info  - Using external babel configuration from /opt/build/repo/.babelrc
1:06:14 PM: info  - Using external babel configuration from /opt/build/repo/.babelrc
1:06:15 PM: info  - Using external babel configuration from /opt/build/repo/.babelrc
1:06:38 PM: (node:1684) [DEP_WEBPACK_CHUNK_HAS_ENTRY_MODULE] DeprecationWarning: Chunk.hasEntryModule: Use new ChunkGraph API
1:06:38 PM: (Use `node --trace-deprecation ...` to show where the warning was created)
1:06:54 PM: warn  - Compiled with warnings
1:06:54 PM: ./node_modules/next/dist/server/load-components.js
1:06:54 PM: Critical dependency: the request of a dependency is an expression
1:06:54 PM: ./node_modules/next/dist/server/load-components.js
1:06:54 PM: Critical dependency: the request of a dependency is an expression
1:06:54 PM: ./node_modules/next/dist/server/load-components.js
1:06:54 PM: Critical dependency: the request of a dependency is an expression
1:06:54 PM: ./node_modules/next/dist/server/require.js
1:06:54 PM: Critical dependency: the request of a dependency is an expression
1:06:54 PM: ./node_modules/next/dist/server/require.js
1:06:54 PM: Critical dependency: the request of a dependency is an expression
1:06:54 PM: ./node_modules/next/dist/server/require.js
1:06:54 PM: Critical dependency: the request of a dependency is an expression
1:06:54 PM: info  - Collecting page data...
1:07:02 PM: > Build error occurred
1:07:02 PM: Error: No native build was found for platform=linux arch=x64 runtime=node abi=93 uv=1 libc=glibc
1:07:02 PM:     at Function.load.path (/opt/build/repo/.next/serverless/chunks/597.js:127127:9)
1:07:02 PM:     at load (/opt/build/repo/.next/serverless/chunks/597.js:127091:30)
1:07:02 PM:     at Object.874746 (/opt/build/repo/.next/serverless/chunks/597.js:126167:45)
1:07:02 PM:     at __webpack_require__ (/opt/build/repo/.next/serverless/pages/dashboard/member.js:2496:43)
1:07:02 PM:     at Object.190717 (/opt/build/repo/.next/serverless/chunks/597.js:126269:17)
1:07:02 PM:     at __webpack_require__ (/opt/build/repo/.next/serverless/pages/dashboard/member.js:2496:43)
1:07:02 PM:     at Object.261275 (/opt/build/repo/.next/serverless/chunks/597.js:126159:46)
1:07:02 PM:     at __webpack_require__ (/opt/build/repo/.next/serverless/pages/dashboard/member.js:2496:43)
1:07:02 PM:     at Object.41998 (/opt/build/repo/.next/serverless/chunks/597.js:127254:29)
1:07:02 PM:     at __webpack_require__ (/opt/build/repo/.next/serverless/pages/dashboard/member.js:2496:43) {
1:07:02 PM:   type: 'Error'
1:07:02 PM: }
1:07:03 PM: ​
1:07:03 PM: ────────────────────────────────────────────────────────────────
1:07:03 PM:   "build.command" failed                                        
1:07:03 PM: ────────────────────────────────────────────────────────────────
1:07:03 PM: ​
1:07:03 PM:   Error message
1:07:03 PM:   Command failed with exit code 1: CI= npm run build
1:07:03 PM: ​
1:07:03 PM:   Error location
1:07:03 PM:   In build.command from netlify.toml:
1:07:03 PM:   CI= npm run build
1:07:03 PM: ​
1:07:03 PM:   Resolved config
1:07:03 PM:   build:
1:07:03 PM:     command: CI= npm run build
1:07:03 PM:     commandOrigin: config
1:07:03 PM:     publish: /opt/build/repo/out
1:07:03 PM:     publishOrigin: config
1:07:03 PM:   functionsDirectory: /opt/build/repo/functions
1:07:03 PM:   plugins:
1:07:03 PM:     - inputs: {}
1:07:03 PM:       origin: ui
1:07:03 PM:       package: '@netlify/plugin-nextjs'
1:07:03 PM: Caching artifacts
1:07:03 PM: Started saving node modules
1:07:03 PM: Finished saving node modules
1:07:03 PM: Started saving build plugins
1:07:03 PM: Finished saving build plugins
1:07:03 PM: Started saving pip cache
1:07:03 PM: Finished saving pip cache
1:07:03 PM: Started saving emacs cask dependencies
1:07:03 PM: Finished saving emacs cask dependencies
1:07:03 PM: Started saving maven dependencies
1:07:03 PM: Finished saving maven dependencies
1:07:03 PM: Started saving boot dependencies
1:07:03 PM: Finished saving boot dependencies
1:07:03 PM: Started saving rust rustup cache
1:07:03 PM: Finished saving rust rustup cache
1:07:03 PM: Started saving go dependencies
1:07:03 PM: Finished saving go dependencies
1:07:06 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
1:07:06 PM: Creating deploy upload records
1:07:06 PM: Failing build: Failed to build site
1:07:06 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
1:07:06 PM: Finished processing build request in 3m32.928614386s

Hi @zxvf

This Stack Overflow post might help.

If not, can you make your repository public so others can assist you better.

nope, this wasn’t i was looking for and sorry i can’t make the repo public, client doesn’t want it to

Based on reading the log, this is the error cause

1:07:02 PM: Error: No native build was found for platform=linux arch=x64 runtime=node abi=93 uv=1 libc=glibc

which traces back to

at __webpack_require__ (/opt/build/repo/.next/serverless/pages/dashboard/member.js:2496:43)

That’s about all I’ve got. Hopefully another community member can provide you more relevant assistance should you still require it.

thanks for your assistance, i’ve figured out these trace too but there’s nothing buggy in β€œmember.js” causing this, thanks again :smiley:

From reading this discussion on github, it looks like perhaps the issue is the version of Node your site is attempting to use. abi=93 indicates that you’re attempting to use Node v16 (see NODE_MODULE_VERSION here), so perhaps there’s a dependency you use somewhere that isn’t compatible with that version of Node.

Are you currently setting the version of Node in your package.json? Maybe try change it to an earlier version and see if that helps with the error

ok i will check it out, thanks.

I solved it, it was related with my database.

Great news @zxvf.

Any chance you can elaborate on the cause and solution for anyone else who may face this error in the future.

Well i made a wrong import of pouch db and it caused the havoc :rofl:, anyways thanks @coelmay for your efforts

1 Like