Build script returned non-zero exit code: 1 &2 - New deployments on existing site fail

Hi all,

I have a site built on Nuxt that has deployed perfectly fine in the past (thanks!). However, after making a little modification today, I have had around 5 build errors in a row. Unfortunately, I’m unable to determine why the errors below have suddenly started happening. My Nuxt app hasn’t had any real changes for years, other than the change of a markdown file in the content directory. The app can build and generate fine locally.

Any assistance on resolving this would be huuuuugely appreciated!

Thanks.

11:56:15 AM: build-image version: c0621868af5001023389eeaa9dbfbbaf313f67e2 (focal)
11:56:15 AM: buildbot version: c0621868af5001023389eeaa9dbfbbaf313f67e2
11:56:15 AM: Building without cache
11:56:15 AM: Starting to prepare the repo for build
11:56:15 AM: No cached dependencies found. Cloning fresh repo
11:56:15 AM: git clone --filter=blob:none https://github.com/mysite/mysite.com
11:56:16 AM: Preparing Git Reference refs/heads/main
11:56:17 AM: Parsing package.json dependencies
11:56:19 AM: Starting build script
11:56:19 AM: Installing dependencies
11:56:19 AM: Python version set to 2.7
11:56:19 AM: Downloading and installing node v12.18.0...
11:56:19 AM: Downloading https://nodejs.org/dist/v12.18.0/node-v12.18.0-linux-x64.tar.xz...
11:56:19 AM: Computing checksum with sha256sum
11:56:19 AM: Checksums matched!
11:56:21 AM: Now using node v12.18.0 (npm v6.14.4)
11:56:21 AM: Started restoring cached build plugins
11:56:21 AM: Finished restoring cached build plugins
11:56:21 AM: Attempting Ruby version 2.7.1, read from environment
11:56:21 AM: Required ruby-2.7.1 is not installed - installing.
11:56:21 AM: Searching for binary rubies, this might take some time.
11:56:21 AM: Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/20.04/x86_64/ruby-2.7.1.tar.bz2
11:56:21 AM: Checking requirements for ubuntu.
11:56:22 AM: Requirements installation successful.
11:56:22 AM: ruby-2.7.1 - #configure
11:56:22 AM: ruby-2.7.1 - #download
11:56:22 AM: ruby-2.7.1 - #validate archive
11:56:25 AM: ruby-2.7.1 - #extract
11:56:27 AM: ruby-2.7.1 - #validate binary
11:56:28 AM: ruby-2.7.1 - #setup
11:56:28 AM: ruby-2.7.1 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.7.1@global
11:56:28 AM: ruby-2.7.1 - #importing gemset /opt/buildhome/.rvm/gemsets/global.gems........................................
11:56:28 AM: ruby-2.7.1 - #generating global wrappers........
11:56:28 AM: ruby-2.7.1 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.7.1
11:56:28 AM: ruby-2.7.1 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list
11:56:29 AM: ruby-2.7.1 - #generating default wrappers........
11:56:29 AM: Using /opt/buildhome/.rvm/gems/ruby-2.7.1
11:56:29 AM: Using Ruby version 2.7.1
11:56:29 AM: Using PHP version 8.0
11:56:29 AM: Started restoring cached corepack dependencies
11:56:29 AM: Finished restoring cached corepack dependencies
11:56:29 AM: No npm workspaces detected
11:56:29 AM: Started restoring cached node modules
11:56:29 AM: Finished restoring cached node modules
11:56:29 AM: Installing npm packages using npm version 6.14.4
11:56:33 AM: npm WARN deprecated @types/webpack-dev-middleware@5.3.0: This is a stub types definition. webpack-dev-middleware provides its own type definitions, so you do not need this installed.
11:56:35 AM: npm WARN deprecated @types/browserslist@4.15.0: This is a stub types definition. browserslist provides its own type definitions, so you do not need this installed.
11:56:40 AM: npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
11:56:41 AM: npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
11:56:41 AM: npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
11:56:41 AM: npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
11:56:41 AM: 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
11:56:42 AM: npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
11:56:42 AM: npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
11:56:42 AM: npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
11:56:42 AM: npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
11:56:55 AM: > core-js@3.28.0 postinstall /opt/build/repo/node_modules/core-js
11:56:55 AM: > node -e "try{require('./postinstall')}catch(e){}"
11:56:56 AM: > nuxt@2.16.1 postinstall /opt/build/repo/node_modules/nuxt
11:56:56 AM: > opencollective || exit 0
11:56:56 AM: npm notice created a lockfile as package-lock.json. You should commit this file.
11:56:56 AM: npm WARN notsup Unsupported engine for webpack-dev-middleware@6.0.1: wanted: {"node":">= 14.15.0"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: webpack-dev-middleware@6.0.1
11:56:56 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents):
11:56:56 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-import@15.1.0: wanted: {"node":">=14.0.0"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-import@15.1.0
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-preset-env@8.0.1: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-preset-env@8.0.1
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/postcss-cascade-layers@3.0.1: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/postcss-cascade-layers@3.0.1
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/postcss-color-function@2.1.0: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/postcss-color-function@2.1.0
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/postcss-font-format-keywords@2.0.2: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/postcss-font-format-keywords@2.0.2
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/postcss-hwb-function@2.1.1: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/postcss-hwb-function@2.1.1
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/postcss-ic-unit@2.0.2: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/postcss-ic-unit@2.0.2
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/postcss-is-pseudo-class@3.1.1: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/postcss-is-pseudo-class@3.1.1
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/postcss-logical-resize@1.0.1: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/postcss-logical-resize@1.0.1
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/postcss-media-queries-aspect-ratio-number-values@1.0.1: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/postcss-media-queries-aspect-ratio-number-values@1.0.1
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/postcss-logical-float-and-clear@1.0.1: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/postcss-logical-float-and-clear@1.0.1
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/postcss-logical-viewport-units@1.0.2: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/postcss-logical-viewport-units@1.0.2
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/postcss-nested-calc@2.0.2: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/postcss-nested-calc@2.0.2
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/postcss-normalize-display-values@2.0.1: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/postcss-normalize-display-values@2.0.1
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/postcss-progressive-custom-properties@2.1.0: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/postcss-progressive-custom-properties@2.1.0
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/postcss-oklab-function@2.1.0: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/postcss-oklab-function@2.1.0
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/postcss-scope-pseudo-class@2.0.2: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/postcss-scope-pseudo-class@2.0.2
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/postcss-text-decoration-shorthand@2.2.1: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/postcss-text-decoration-shorthand@2.2.1
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/postcss-stepped-value-functions@2.1.0: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/postcss-stepped-value-functions@2.1.0
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/postcss-trigonometric-functions@2.0.1: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/postcss-trigonometric-functions@2.0.1
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/postcss-unset-value@2.0.1: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/postcss-unset-value@2.0.1
11:56:56 AM: npm WARN notsup Unsupported engine for css-blank-pseudo@5.0.2: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: css-blank-pseudo@5.0.2
11:56:56 AM: npm WARN notsup Unsupported engine for css-prefers-color-scheme@8.0.2: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: css-prefers-color-scheme@8.0.2
11:56:56 AM: npm WARN notsup Unsupported engine for css-has-pseudo@5.0.2: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: css-has-pseudo@5.0.2
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-attribute-case-insensitive@6.0.2: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-attribute-case-insensitive@6.0.2
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-color-hex-alpha@9.0.2: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-color-hex-alpha@9.0.2
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-color-rebeccapurple@8.0.2: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-color-rebeccapurple@8.0.2
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-custom-media@9.1.2: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-custom-media@9.1.2
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-color-functional-notation@5.0.2: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-color-functional-notation@5.0.2
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-custom-properties@13.1.4: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-custom-properties@13.1.4
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-custom-selectors@7.1.2: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-custom-selectors@7.1.2
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-dir-pseudo-class@7.0.2: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-dir-pseudo-class@7.0.2
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-double-position-gradients@4.0.2: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-double-position-gradients@4.0.2
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-focus-visible@8.0.2: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-focus-visible@8.0.2
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-focus-within@7.0.2: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-focus-within@7.0.2
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-gap-properties@4.0.1: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-gap-properties@4.0.1
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-image-set-function@5.0.2: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-image-set-function@5.0.2
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-lab-function@5.1.0: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-lab-function@5.1.0
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-logical@6.1.0: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-logical@6.1.0
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-nesting@11.2.1: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-nesting@11.2.1
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-overflow-shorthand@4.0.1: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-overflow-shorthand@4.0.1
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-place@8.0.1: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-place@8.0.1
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-pseudo-class-any-link@8.0.2: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-pseudo-class-any-link@8.0.2
11:56:56 AM: npm WARN notsup Unsupported engine for postcss-selector-not@7.0.1: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: postcss-selector-not@7.0.1
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/selector-specificity@2.1.1: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/selector-specificity@2.1.1
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/color-helpers@1.0.0: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/color-helpers@1.0.0
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/css-tokenizer@2.1.0: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/css-tokenizer@2.1.0
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/css-parser-algorithms@2.0.1: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/css-parser-algorithms@2.0.1
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/media-query-list-parser@2.0.1: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/media-query-list-parser@2.0.1
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/css-calc@1.0.0: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/css-calc@1.0.0
11:56:56 AM: npm WARN notsup Unsupported engine for @csstools/cascade-layer-name-parser@1.0.1: wanted: {"node":"^14 || ^16 || >=18"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:56:56 AM: npm WARN notsup Not compatible with your version of node/npm: @csstools/cascade-layer-name-parser@1.0.1
11:56:56 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents):
11:56:56 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
11:56:56 AM: npm WARN cache-loader@4.1.0 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
11:56:56 AM: npm WARN optimize-css-assets-webpack-plugin@6.0.1 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
11:56:56 AM: added 1675 packages from 862 contributors and audited 1660 packages in 26.566s
11:56:57 AM: 271 packages are looking for funding
11:56:57 AM:   run `npm fund` for details
11:56:57 AM: found 8 vulnerabilities (6 moderate, 2 high)
11:56:57 AM:   run `npm audit fix` to fix them, or `npm audit` for details
11:56:57 AM: npm packages installed
11:56:57 AM: Started restoring cached go cache
11:56:57 AM: Finished restoring cached go cache
11:56:57 AM: Installing Go version 1.14.4 (requested 1.14.4)
11:57:01 AM: go version go1.14.4 linux/amd64
11:57:01 AM: Detected 1 framework(s)
11:57:01 AM: "nuxt" at version "2.16.1"
11:57:01 AM: Section completed: initializing
11:57:03 AM: ​
11:57:03 AM:   Netlify Build                                                 
11:57:03 AM: ────────────────────────────────────────────────────────────────
11:57:03 AM: ​
11:57:03 AM: ❯ Version
11:57:03 AM:   @netlify/build 29.5.8
11:57:03 AM: ​
11:57:03 AM: ❯ Flags
11:57:03 AM:   baseRelDir: true
11:57:03 AM:   buildId: 63f7543fd6c3cf09383947e0
11:57:03 AM:   deployId: 63f7543fd6c3cf09383947e2
11:57:03 AM: ​
11:57:03 AM: ❯ Current directory
11:57:03 AM:   /opt/build/repo
11:57:03 AM: ​
11:57:03 AM: ❯ Config file
11:57:03 AM:   No config file was defined: using default values.
11:57:03 AM: ​
11:57:03 AM: ❯ Context
11:57:03 AM:   production
11:57:03 AM: ​
11:57:03 AM:   1. Build command from Netlify app                             
11:57:03 AM: ────────────────────────────────────────────────────────────────
11:57:03 AM: ​
11:57:03 AM: $ npm run generate
11:57:03 AM: > mysite.com@1.0.0 generate /opt/build/repo
11:57:03 AM: > nuxt-ts generate
11:57:03 AM: internal/modules/cjs/loader.js:969
11:57:03 AM:   throw err;
11:57:03 AM:   ^
11:57:03 AM: Error: Cannot find module '@nuxt/cli-edge'
11:57:03 AM: Require stack:
11:57:03 AM: - /opt/build/repo/node_modules/@nuxt/typescript-runtime/bin/nuxt-ts.js
11:57:03 AM:     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
11:57:03 AM:     at Function.Module._load (internal/modules/cjs/loader.js:842:27)
11:57:03 AM:     at Module.require (internal/modules/cjs/loader.js:1026:19)
11:57:03 AM:     at require (internal/modules/cjs/helpers.js:72:18)
11:57:03 AM:     at Object.<anonymous> (/opt/build/repo/node_modules/@nuxt/typescript-runtime/bin/nuxt-ts.js:9:9)
11:57:03 AM:     at Module._compile (internal/modules/cjs/loader.js:1138:30)
11:57:03 AM:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
11:57:03 AM:     at Module.load (internal/modules/cjs/loader.js:986:32)
11:57:03 AM:     at Function.Module._load (internal/modules/cjs/loader.js:879:14)
11:57:03 AM:     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {
11:57:03 AM:   code: 'MODULE_NOT_FOUND',
11:57:03 AM:   requireStack: [
11:57:03 AM:     '/opt/build/repo/node_modules/@nuxt/typescript-runtime/bin/nuxt-ts.js'
11:57:03 AM:   ]
11:57:03 AM: }
11:57:03 AM: npm ERR! code ELIFECYCLE
11:57:03 AM: npm ERR! errno 1
11:57:03 AM: npm ERR! mysite.com@1.0.0 generate: `nuxt-ts generate`
11:57:03 AM: npm ERR! Exit status 1
11:57:03 AM: npm ERR!
11:57:03 AM: npm ERR! Failed at the mysite.com@1.0.0 generate script.
11:57:03 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
11:57:03 AM: npm ERR! A complete log of this run can be found in:
11:57:03 AM: npm ERR!     /opt/buildhome/.npm/_logs/2023-02-23T11_57_03_571Z-debug.log
11:57:03 AM: ​
11:57:03 AM:   "build.command" failed                                        
11:57:03 AM: ────────────────────────────────────────────────────────────────
11:57:03 AM: ​
11:57:06 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
11:57:03 AM:   Error message
11:57:03 AM:   Command failed with exit code 1: npm run generate (https://ntl.fyi/exit-code-1)
11:57:03 AM: ​
11:57:03 AM:   Error location
11:57:03 AM:   In Build command from Netlify app:
11:57:03 AM:   npm run generate
11:57:03 AM: ​
11:57:03 AM:   Resolved config
11:57:03 AM:   build:
11:57:03 AM:     command: npm run generate
11:57:03 AM:     commandOrigin: ui
11:57:03 AM:     publish: /opt/build/repo/dist
11:57:03 AM:     publishOrigin: ui
11:57:04 AM: Caching artifacts
11:57:04 AM: Started saving node modules
11:57:04 AM: Finished saving node modules
11:57:04 AM: Started saving build plugins
11:57:04 AM: Finished saving build plugins
11:57:04 AM: Started saving corepack cache
11:57:04 AM: Finished saving corepack cache
11:57:04 AM: Started saving pip cache
11:57:04 AM: Finished saving pip cache
11:57:04 AM: Started saving emacs cask dependencies
11:57:04 AM: Finished saving emacs cask dependencies
11:57:04 AM: Started saving maven dependencies
11:57:04 AM: Finished saving maven dependencies
11:57:04 AM: Started saving boot dependencies
11:57:04 AM: Finished saving boot dependencies
11:57:04 AM: Started saving rust rustup cache
11:57:04 AM: Finished saving rust rustup cache
11:57:04 AM: Started saving go dependencies
11:57:04 AM: Finished saving go dependencies
11:57:06 AM: Cached Ruby version 2.7.1
11:57:06 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:57:06 AM: Failing build: Failed to build site
11:57:06 AM: Finished processing build request in 51.369s

Please share your site name/slug so we can investigate?

Also we need a little more information on the issues you are facing.

First, have you looked through this resource? It is a compilation of all of our build and deploy resources. This is a good starting point.

If you have worked through those guides and are still encountering issues please share the following information:

  • what you have already tried
  • any error messages you have received in your terminal window or in the developer console

Hey @SamO - Thanks for the response!

I have looked through the resources (albeit briefly as my site has been working perfectly for the past 2 years).

Scenario

  1. I committed my site to GH as usual
  2. Netlify detected the commit and started the build
  3. It failed.
  4. I had changed a mark down file and removed a folder that was associated with Forestry CMS. Other than that, nothing has changed.

Things I’ve tried

  • I’ve tried deleting the node modules and reinstalling them
  • I’ve uninstalled @nuxt/typescript-runtime package and changed the commands to use nuxt opposed to nuxt-ts. This built and generated fine locally (using the same generate command netlify is assigned to use)
 WARN  You're using Nuxt 2.16.1, which includes built-in TypeScript runtime support                                          
 WARN  You can safely use nuxt instead of nuxt-ts and remove @nuxt/typescript-runtime package 
  • I even tried adding back in the deleted folder in the event it had an adverse effect

To summarise, I’m not entirely sure what to do and check because everything I configured two years ago worked with an app that’s essentially unchanged. At the moment I’m worried about changing anything on my second app in the event it takes down a highly used site.

Is it safe to provide my personal site details here? (I thought that would be private)

Thanks again, hopefully you can help.

Did you try adding the dependency that’s being reported as missing: https://www.npmjs.com/package/@nuxt/cli-edge?

Hey there! I did try that and it didn’t work, unfortunately. As a last resort I’ve even rebuilt the website in Nuxt.js 3 from scratch. Everything builds locally, everything can generate locally but Netlify is still failing on the deployment process. It looks as though the build command runs, but Netlify isn’t finding the output?

Updated screenshot below.

Error

Build Settings

I’ve also checked that the dist folder has been added to gitignore.

So it turns out adding a netlify.toml file with the following information seems to bypass the deployment settings and now everything works (fails without it)!

[build]
command = "npm run generate"
publish = "dist"
environment = { NODE_VERSION = "16.14.2", NPM_VERSION = "8.5.0" }

@XavierLight There’s no mystery here, the issue as reported by your build is frequently:

11:56:56 AM: npm WARN notsup Unsupported engine for ...
wanted: {"node":"^14 || ^16 || >=18"}
(current: {"node":"12.18.0","npm":"6.14.4"})

So your build was running with node 12.18.0, which is too low for your dependencies.

Your change has set node to 16.14.2.

There’s nothing wrong with what you’ve done, but there are other ways that the node version can be set:

Thanks Nathan. Yes, I had noticed that too and already tried the NODE_VERSION approach in the environment variables which resulted in a build log over a 1000 lines long that didn’t seem as though it was going to stop. So I cancelled it to avoid my build minutes increasing.

At least I’m aware of two ways of achieving it in the future. Thanks for your time! :slight_smile:

@XavierLight It’s not just NODE_VERSION.

Netlify will use the version you set in an .nvmrc or .node-version file.

Ahh gotcha. Thanks! Interesting how it originally happened on a project that hadn’t been touched for two years. At least it’s working with a fresh code base now. Appreciate the quick response!

1 Like

Hi @XavierLight Thanks for confirming it’s working now.