Our netlify-cms app suddenly stopped building

Hi,

A few days ago our app suddenly stopped building. The error seems to be related to Yarn, but it is strange because we haven’t changed the yarn.lock in two years. Also, the commit when it stopped building didn’t touch our package.json file, I only removed a redirect rule from netlify.toml

Our app name: timeline-cms

Logs:

12:19:33 PM: Build ready to start
12:19:36 PM: build-image version: c6001ed68662a13e5deb24abec2b46058c58248a
12:19:36 PM: build-image tag: v3.9.0
12:19:36 PM: buildbot version: f650485c830eb31597911322420b99299a4303b8
12:19:36 PM: Building without cache
12:19:36 PM: Starting to prepare the repo for build
12:19:37 PM: No cached dependencies found. Cloning fresh repo
12:19:37 PM: git clone https://github.com/devnacho/timeline-cms
12:19:44 PM: Preparing Git Reference refs/heads/master
12:19:45 PM: Parsing package.json dependencies
12:19:46 PM: Starting build script
12:19:46 PM: Installing dependencies
12:19:46 PM: Python version set to 2.7
12:19:47 PM: Downloading and installing node v10.24.1...
12:19:48 PM: Downloading https://nodejs.org/dist/v10.24.1/node-v10.24.1-linux-x64.tar.xz...
12:19:48 PM: Computing checksum with sha256sum
12:19:48 PM: Checksums matched!
12:19:51 PM: Now using node v10.24.1 (npm v6.14.12)
12:19:51 PM: Started restoring cached build plugins
12:19:51 PM: Finished restoring cached build plugins
12:19:51 PM: Attempting ruby version 2.6.2, read from environment
12:19:53 PM: Using ruby version 2.6.2
12:19:53 PM: Using PHP version 5.6
12:19:53 PM: Started restoring cached yarn cache
12:19:53 PM: Finished restoring cached yarn cache
12:19:53 PM: Installing yarn at version 1.9.4
12:19:53 PM: Installing Yarn!
12:19:53 PM: > Downloading tarball...
12:19:53 PM: [1/2]: https://yarnpkg.com/downloads/1.9.4/yarn-v1.9.4.tar.gz --> /tmp/yarn.tar.gz.ddCwEkZnDz
12:19:53 PM:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
12:19:53 PM:                                  Dload  Upload   Total   Spent    Left  Speed
12:19:54 PM:   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
12:19:54 PM: 100    77  100    77    0     0    342      0 --:--:-- --:--:-- --:--:--   342
12:19:54 PM: 100    77  100    77    0     0    342      0 --:--:-- --:--:-- --:--:--   342
12:19:54 PM: 100    91  100    91    0     0    150      0 --:--:-- --:--:-- --:--:--   150
12:19:54 PM: 100   624  100   624    0     0    712      0 --:--:-- --:--:-- --:--:--   712
12:19:55 PM: 100  915k  100  915k    0     0   790k      0  0:00:01  0:00:01 --:--:--  790k
12:19:55 PM: [2/2]: https://yarnpkg.com/downloads/1.9.4/yarn-v1.9.4.tar.gz.asc --> /tmp/yarn.tar.gz.ddCwEkZnDz.asc
12:19:55 PM: 100    81  100    81    0     0   1308      0 --:--:-- --:--:-- --:--:--  1308
12:19:55 PM: 100    81  100    81    0     0   1303      0 --:--:-- --:--:-- --:--:--     0
12:19:55 PM: 100    95  100    95    0     0   1034      0 --:--:-- --:--:-- --:--:--  1034
12:19:55 PM: 100   628  100   628    0     0   3117      0 --:--:-- --:--:-- --:--:--  3117
12:19:55 PM: 100   832  100   832    0     0   3319      0 --:--:-- --:--:-- --:--:--  3319
12:19:55 PM: > Verifying integrity...
12:19:55 PM: gpg: Signature made Fri 03 Aug 2018 07:53:36 PM UTC using RSA key ID B6FF4DE3
12:19:55 PM: gpg: Good signature from "Yarn Packaging <yarn@dan.cx>"
12:19:55 PM: gpg: Note: This key has expired!
12:19:55 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907  BBB7 1646 B01B 86E5 0310
12:19:55 PM:      Subkey fingerprint: E219 30C4 D0A4 AA46 1858  1F7A E074 D16E B6FF 4DE3
12:19:55 PM: > GPG signature looks good
12:19:55 PM: > Extracting to ~/.yarn...
12:19:55 PM: > Adding to $PATH...
12:19:56 PM: > Successfully installed Yarn 1.9.4! Please open another terminal where the `yarn` command will now be available.
12:19:56 PM: No yarn workspaces detected
12:19:56 PM: Started restoring cached node modules
12:19:56 PM: Finished restoring cached node modules
12:19:57 PM: Installing NPM modules using Yarn version 1.9.4
12:19:58 PM: yarn install v1.9.4
12:19:58 PM: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
12:19:58 PM: [1/4] Resolving packages...
12:19:58 PM: warning browser-sync > socket.io > debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
12:19:58 PM: warning browser-sync > socket.io > engine.io > debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
12:19:58 PM: warning browser-sync > socket.io > socket.io-parser > debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
12:20:02 PM: [2/4] Fetching packages...
12:20:02 PM: (node:1472) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
12:20:29 PM: error yargs@17.1.1: The engine "node" is incompatible with this module. Expected version ">=12".
12:20:29 PM: error Found incompatible module
12:20:29 PM: info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
12:20:29 PM: Error during Yarn install
12:20:29 PM: Build was terminated: Build script returned non-zero exit code: 1
12:20:29 PM: Creating deploy upload records
12:20:29 PM: Failing build: Failed to build site
12:20:29 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1
12:20:29 PM: Finished processing build request in 53.309235324s

Support suggested us to set NETLIFY_USE_YARN env var as true but nothing changed with this change.

Hiya, sorry you are having trouble with your build.

This Support Guide contains a ton of useful debugging tips that can likely help you solve your problem :slight_smile:

We also recommend trying to search the forums with the build error you encountered - it’s likely your question was already asked by someone else!

If you are still having problems, please provide as much information as you can on what you have already tried, what your build settings are, your package.json, etc. Thanks!

Probably related:

Thank you very much @tomrutgers

I was able to solve the issue by setting NODE_VERSION in my netlify.toml and then clearing the cache and deploy.

1 Like