Hi I’m getting a segmentation fault on build
I’m using nextjs export to generate a static site.
Site name: https://thirsty-wozniak-e8488e.netlify.app/
build log:
9:51:46 AM: Build ready to start
9:51:48 AM: build-image version: d84c79427e8f83c1ba17bcdd7b3fe38059376b68
9:51:48 AM: build-image tag: v3.6.1
9:51:48 AM: buildbot version: d8e1c13dfa09a710800c3bc5ceee4ff2d6548477
9:51:48 AM: Building without cache
9:51:48 AM: Starting to prepare the repo for build
9:51:48 AM: No cached dependencies found. Cloning fresh repo
9:51:48 AM: git clone https://github.com/Rynhardf/solar-delight
9:51:50 AM: Preparing Git Reference refs/heads/main
9:51:51 AM: Starting build script
9:51:51 AM: Installing dependencies
9:51:51 AM: Python version set to 2.7
9:51:52 AM: Downloading and installing node v14.16.0…
9:51:53 AM: Downloading https://nodejs.org/dist/v14.16.0/node-v14.16.0-linux-x64.tar.xz…
9:51:53 AM: Computing checksum with sha256sum
9:51:53 AM: Checksums matched!
9:51:56 AM: Now using node v14.16.0 (npm v6.14.11)
9:51:56 AM: Started restoring cached build plugins
9:51:56 AM: Finished restoring cached build plugins
9:51:56 AM: Attempting ruby version 2.7.1, read from environment
9:51:57 AM: Using ruby version 2.7.1
9:51:58 AM: Using PHP version 5.6
9:51:58 AM: Started restoring cached node modules
9:51:58 AM: Finished restoring cached node modules
9:51:58 AM: Installing NPM modules using NPM version 6.14.11
9:52:08 AM: npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I’ll try to do my best with it!
9:52:08 AM: > sharp@0.27.2 install /opt/build/repo/node_modules/sharp
9:52:08 AM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
9:52:10 AM: info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.5/libvips-8.10.5-linux-x64.tar.br
9:52:13 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
9:52:13 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
9:52:13 AM: added 570 packages from 424 contributors and audited 571 packages in 13.987s
9:52:13 AM: 78 packages are looking for funding
9:52:13 AM: run npm fund for details
9:52:13 AM: found 0 vulnerabilities
9:52:13 AM: NPM modules installed
9:52:13 AM: Started restoring cached go cache
9:52:13 AM: Finished restoring cached go cache
9:52:13 AM: go version go1.14.4 linux/amd64
9:52:13 AM: go version go1.14.4 linux/amd64
9:52:13 AM: Installing missing commands
9:52:13 AM: Verify run directory
9:52:15 AM:
9:52:15 AM: ────────────────────────────────────────────────────────────────
9:52:15 AM: Netlify Build
9:52:15 AM: ────────────────────────────────────────────────────────────────
9:52:15 AM:
9:52:15 AM: ❯ Version
9:52:15 AM: @netlify/build 9.8.6
9:52:15 AM:
9:52:15 AM: ❯ Flags
9:52:15 AM: deployId: 60487a92fcf4caba323eb448
9:52:15 AM: mode: buildbot
9:52:15 AM:
9:52:15 AM: ❯ Current directory
9:52:15 AM: /opt/build/repo
9:52:15 AM:
9:52:15 AM: ❯ Config file
9:52:15 AM: No config file was defined: using default values.
9:52:15 AM:
9:52:15 AM: ❯ Context
9:52:15 AM: production
9:52:15 AM:
9:52:15 AM: ────────────────────────────────────────────────────────────────
9:52:15 AM: 1. Build command from Netlify app
9:52:15 AM: ────────────────────────────────────────────────────────────────
9:52:15 AM:
9:52:15 AM: $ npm run build
9:52:15 AM: > solar-delight@0.1.0 build /opt/build/repo
9:52:15 AM: > node optimizeImages && next build && next export
9:52:18 AM: warn - No build cache found. Please configure build caching for faster rebuilds. Read more: no-cache | Next.js
9:52:18 AM: info - Creating an optimized production build…
9:52:45 AM: info - Compiled successfully
9:52:45 AM: info - Collecting page data…
9:52:47 AM: info - Generating static pages (0/8)
9:52:48 AM: info - Generating static pages (2/8)
9:52:49 AM: info - Generating static pages (4/8)
9:52:49 AM: info - Generating static pages (6/8)
9:52:50 AM: info - Generating static pages (8/8)
9:52:50 AM: info - Finalizing page optimization…
9:52:50 AM: Page Size First Load JS
9:52:50 AM: ┌ ● / 11.1 kB 94.2 kB
9:52:50 AM: ├ └ css/e170a066face504d9656.css 1.06 kB
9:52:50 AM: ├ /_app 0 B 63.4 kB
9:52:50 AM: ├ ○ /404 3.03 kB 66.4 kB
9:52:50 AM: ├ ● /about-us 362 B 70 kB
9:52:50 AM: ├ ● /blog 315 B 70 kB
9:52:50 AM: ├ ● /calculator 1.89 kB 71.6 kB
9:52:50 AM: ├ ● /gallery 786 B 70.5 kB
9:52:50 AM: └ ● /services 3.31 kB 86.4 kB
9:52:50 AM: + First Load JS shared by all 63.4 kB
9:52:50 AM: ├ chunks/commons.9aa62c.js 13.4 kB
9:52:50 AM: ├ chunks/framework.d2e618.js 42.1 kB
9:52:50 AM: ├ chunks/main.f8e7b8.js 6.64 kB
9:52:50 AM: ├ chunks/pages/_app.4457f5.js 561 B
9:52:50 AM: ├ chunks/webpack.50bee0.js 751 B
9:52:50 AM: └ css/58d8dbcd0bb30ce4e3d2.css 2.64 kB
9:52:50 AM: λ (Lambda) server-side renders at runtime (uses getInitialProps or getServerSideProps)
9:52:50 AM: ○ (Static) automatically rendered as static HTML (uses no initial props)
9:52:50 AM: ● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
9:52:50 AM: (ISR) incremental static regeneration (uses revalidate in getStaticProps)
9:52:51 AM: info - using build directory: /opt/build/repo/.next
9:52:51 AM: info - Copying “static build” directory
9:52:51 AM: info - No “exportPathMap” found in “next.config.js”. Generating map from “./pages”
9:52:51 AM: info - Launching 7 workers
9:52:51 AM: info - Exporting (0/7)
9:52:51 AM: info - Copying “public” directory
9:52:52 AM: info - Exporting (1/7)
9:52:52 AM: info - Exporting (3/7)
9:52:52 AM: info - Exporting (5/7)
9:52:53 AM: info - Exporting (7/7)
9:52:53 AM: Export successful. Files written to /opt/build/repo/out
9:52:53 AM: Segmentation fault (core dumped)
9:52:53 AM: npm ERR! code ELIFECYCLE
9:52:53 AM: npm ERR! errno 139
9:52:53 AM: npm ERR! solar-delight@0.1.0 build: node optimizeImages && next build && next export
9:52:53 AM: npm ERR! Exit status 139
9:52:53 AM: npm ERR!
9:52:53 AM: npm ERR! Failed at the solar-delight@0.1.0 build script.
9:52:53 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
9:52:53 AM: npm ERR! A complete log of this run can be found in:
9:52:53 AM: npm ERR! /opt/buildhome/.npm/_logs/2021-03-10T07_52_53_409Z-debug.log
9:52:53 AM:
9:52:53 AM: ────────────────────────────────────────────────────────────────
9:52:53 AM: “build.command” failed
9:52:53 AM: ────────────────────────────────────────────────────────────────
9:52:53 AM:
9:52:53 AM: Error message
9:52:53 AM: Command failed with exit code 139: npm run build
9:52:53 AM:
9:52:53 AM: Error location
9:52:53 AM: In Build command from Netlify app:
9:52:53 AM: npm run build
9:52:53 AM:
9:52:53 AM: Resolved config
9:52:53 AM: build:
9:52:53 AM: command: npm run build
9:52:53 AM: commandOrigin: ui
9:52:53 AM: environment:
9:52:53 AM: - NODE_VERSION
9:52:53 AM: publish: /opt/build/repo/out
9:52:53 AM: Caching artifacts
9:52:53 AM: Started saving node modules
9:52:53 AM: Finished saving node modules
9:52:53 AM: Started saving build plugins
9:52:53 AM: Finished saving build plugins
9:52:53 AM: Started saving pip cache
9:52:53 AM: Finished saving pip cache
9:52:53 AM: Started saving emacs cask dependencies
9:52:53 AM: Finished saving emacs cask dependencies
9:52:53 AM: Started saving maven dependencies
9:52:53 AM: Finished saving maven dependencies
9:52:53 AM: Started saving boot dependencies
9:52:53 AM: Finished saving boot dependencies
9:52:53 AM: Started saving rust rustup cache
9:52:53 AM: Finished saving rust rustup cache
9:52:53 AM: Started saving go dependencies
9:52:53 AM: Finished saving go dependencies
9:52:56 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
9:52:56 AM: Failing build: Failed to build site
9:52:56 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
9:52:56 AM: Finished processing build request in 1m8.586844649s
It seems as if the nextjs build and export worked and that something went wrong after that.
Please let me know if I can provide any more info to help solve the problem

