Build fails stating node engine version incompatible with module

Hello,

My project builds locally just fine, but fails in Netlify with the following error:

error protobufjs@7.1.2: The engine "node" is incompatible with this module. Expected version ">=12.0.0". Got "10.24.1"

I’ve deleted and recreated my yarn.lock, redeployed (w/ cache clearing). I haven’t found anything out there regarding this package, outside of I think it’s used by Firebase which I’m using.

But I’m curious why the local build works, project runs, etc but build fails in Netlify?

Apologies if I missed including information.

Build settings:

Build log below:
7:58:24 PM: build-image version: d7b3813f01c06610bc1723ff1b22446513ee7941 (focal) 7:58:24 PM: build-image tag: v4.14.3 7:58:24 PM: buildbot version: 4f669c94b322d52f143cdcbb17e55d40094aa06d 7:58:24 PM: Building without cache 7:58:24 PM: Starting to prepare the repo for build 7:58:25 PM: No cached dependencies found. Cloning fresh repo 7:58:25 PM: git clone https://github.com/pnwnelson/project-egg 7:58:25 PM: Preparing Git Reference pull/213/head 7:58:26 PM: Parsing package.json dependencies 7:58:27 PM: Section completed: initializing 7:58:27 PM: Starting build script 7:58:27 PM: Installing dependencies 7:58:27 PM: Python version set to 2.7 7:58:28 PM: Downloading and installing node v10.24.1... 7:58:28 PM: Downloading https://nodejs.org/dist/v10.24.1/node-v10.24.1-linux-x64.tar.xz... 7:58:28 PM: Computing checksum with sha256sum 7:58:28 PM: Checksums matched! 7:58:29 PM: Now using node v10.24.1 (npm v6.14.12) 7:58:29 PM: Started restoring cached build plugins 7:58:29 PM: Finished restoring cached build plugins 7:58:29 PM: Attempting ruby version 2.6.2, read from environment 7:58:30 PM: Required ruby-2.6.2 is not installed - installing. 7:58:30 PM: Searching for binary rubies, this might take some time. 7:58:30 PM: Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/20.04/x86_64/ruby-2.6.2.tar.bz2 7:58:30 PM: Checking requirements for ubuntu. 7:58:30 PM: Requirements installation successful. 7:58:30 PM: ruby-2.6.2 - #configure 7:58:30 PM: ruby-2.6.2 - #download 7:58:31 PM: ruby-2.6.2 - #validate archive 7:58:34 PM: ruby-2.6.2 - #extract 7:58:35 PM: ruby-2.6.2 - #validate binary 7:58:36 PM: ruby-2.6.2 - #setup 7:58:36 PM: ruby-2.6.2 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.6.2@global 7:58:36 PM: ruby-2.6.2 - #importing gemset /opt/buildhome/.rvm/gemsets/global.gems........................................ 7:58:37 PM: ruby-2.6.2 - #generating global wrappers........ 7:58:37 PM: ruby-2.6.2 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.6.2 7:58:37 PM: ruby-2.6.2 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list 7:58:37 PM: ruby-2.6.2 - #generating default wrappers........ 7:58:37 PM: Using /opt/buildhome/.rvm/gems/ruby-2.6.2 7:58:37 PM: Using ruby version 2.6.2 7:58:38 PM: Using PHP version 8.0 7:58:38 PM: Started restoring cached yarn cache 7:58:38 PM: Finished restoring cached yarn cache 7:58:38 PM: Found yarn version (1.22.19) that doesn't match expected (1.17.0)up to date in 0.019s 7:58:38 PM: Installing yarn at version 1.17.0 7:58:38 PM: Installing Yarn! 7:58:38 PM: > Downloading tarball... 7:58:38 PM: [1/2]: https://yarnpkg.com/downloads/1.17.0/yarn-v1.17.0.tar.gz --> /tmp/yarn.tar.gz.6bUaT5UBUn 7:58:38 PM: % Total % Received % Xferd Average Speed Time Time Time Current 7:58:38 PM: Dload Upload Total Spent Left Speed 7:58:38 PM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 7:58:38 PM: 100 79 100 79 0 0 652 0 --:--:-- --:--:-- --:--:-- 652 7:58:39 PM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 7:58:39 PM: 100 93 100 93 0 0 379 0 --:--:-- --:--:-- --:--:-- 861 7:58:39 PM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 7:58:39 PM: 100 1213k 100 1213k 0 0 2328k 0 --:--:-- --:--:-- --:--:-- 2328k 7:58:39 PM: [2/2]: https://yarnpkg.com/downloads/1.17.0/yarn-v1.17.0.tar.gz.asc --> /tmp/yarn.tar.gz.6bUaT5UBUn.asc 7:58:39 PM: % Total % Received % Xferd Average Speed Time Time Time Current 7:58:39 PM: Dload Upload Total Spent Left Speed 7:58:39 PM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 7:58:39 PM: 100 83 100 83 0 0 1220 0 --:--:-- --:--:-- --:--:-- 1220 7:58:39 PM: 100 97 100 97 0 0 970 0 --:--:-- --:--:-- --:--:-- 970 7:58:39 PM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 7:58:39 PM: 100 832 100 832 0 0 3495 0 --:--:-- --:--:-- --:--:-- 3495 7:58:39 PM: > Verifying integrity... 7:58:39 PM: gpg: Signature made Fri 14 Jun 2019 06:55:58 PM UTC 7:58:39 PM: gpg: using RSA key 6D98490C6F1ACDDD448E45954F77679369475BAA 7:58:39 PM: gpg: Good signature from "Yarn Packaging <yarn@dan.cx>" [unknown] 7:58:39 PM: gpg: WARNING: This key is not certified with a trusted signature! 7:58:39 PM: gpg: There is no indication that the signature belongs to the owner. 7:58:39 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310 7:58:39 PM: Subkey fingerprint: 6D98 490C 6F1A CDDD 448E 4595 4F77 6793 6947 5BAA 7:58:39 PM: > GPG signature looks good 7:58:39 PM: > Extracting to ~/.yarn... 7:58:39 PM: > Adding to $PATH... 7:58:39 PM: > Successfully installed Yarn 1.17.0! Please open another terminal where the yarn command will now be available. 7:58:39 PM: No yarn workspaces detected 7:58:39 PM: Started restoring cached node modules 7:58:39 PM: Finished restoring cached node modules 7:58:40 PM: Installing NPM modules using Yarn version 1.17.0 7:58:40 PM: yarn install v1.17.0 7:58:40 PM: [1/4] Resolving packages... 7:58:40 PM: [2/4] Fetching packages... 7:58:57 PM: error protobufjs@7.1.2: The engine "node" is incompatible with this module. Expected version ">=12.0.0". Got "10.24.1" 7:58:57 PM: error Found incompatible module. 7:58:57 PM: info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. 7:58:57 PM: Creating deploy upload records 7:58:57 PM: Error during Yarn install 7:58:57 PM: Build was terminated: Build script returned non-zero exit code: 1 7:58:57 PM: Failing build: Failed to build site 7:58:57 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1 (https://ntl.fyi/exit-code-1) 7:58:57 PM: Finished processing build request in 33.116620732s

Hello @pnwnelson, thanks for the post and welcome.
For more information about build settings and publish directory regarding your framework, kindly visit the link below.

Let me know the outcome.

Thanks.

Thanks for the response. Yes, I’ve looked through those docs already, searched this support forum and the web in general. Hopefully there’s something out there that I’m just not seeing. I’ve had my site building and deploying on Netlify for a couple years before this error started. I upgraded my Firebase package from v8 to v9 and since then, this error. I’m trying to understand what I need to change in my project, or on Netlify. I can’t seem to find a solution yet.

@pnwnelson, kindly share a snippet of your package.json if possible.

I ended up getting the build to work by adding a NODE_VERSION env var build settings, with the value being a Node version that works. If this solution is in the docs somewhere, could you point me to it?

Regardless, here’s the package.json:

{
  "name": "project",
  "version": "2.0.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint",
    "test:unit": "vue-cli-service test:unit"
  },
  "dependencies": {
    "axios": "^0.19.0",
    "dinero.js": "^1.6.0",
    "firebase": "9.9.1",
    "firebaseui": "^3.5.2",
    "fs": "^0.0.1-security",
    "js-cookie": "2.2.1",
    "node-sass": "4.14.1",
    "register-service-worker": "^1.0.0",
    "suncalc": "^1.8.0",
    "velocity-animate": "^1.5.2",
    "vue": "^2.5.21",
    "vue-analytics": "^5.17.0",
    "vue-clickaway": "^2.2.2",
    "vue-enverywhere": "^1.0.4",
    "vue-goodshare": "^1.3.2",
    "vue-i18n": "^8.3.1",
    "vue-meta": "^1.5.8",
    "vue-router": "^3.0.1",
    "vue-social-sharing": "^2.4.7",
    "vuex": "^3.0.1",
    "vuex-persistedstate": "^2.5.4",
    "vuex-router-sync": "^5.0.0"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "^3.0.5",
    "@vue/cli-plugin-eslint": "^3.0.5",
    "@vue/cli-plugin-pwa": "^3.0.5",
    "@vue/cli-plugin-unit-jest": "^3.0.5",
    "@vue/cli-service": "^3.0.5",
    "@vue/eslint-config-standard": "^4.0.0",
    "@vue/test-utils": "^1.0.0-beta.20",
    "babel-core": "7.0.0-bridge.0",
    "babel-eslint": "^10.0.1",
    "babel-jest": "^23.6.0",
    "eslint": "^5.8.0",
    "eslint-plugin-vue": "^5.0.0-0",
    "firebase-tools": "^9.1.2",
    "sass-loader": "^7.0.1",
    "vue-template-compiler": "^2.5.17"
  }
}

Hi @pnwnelson, thanks for sharing how you were able to solve the problem. Glad to know you were able to solve the problem as well.

Based on my knowledge, the page in the docs where there is information about NODE_VERSION is in the link below.

Hope this helps.

Thanks.

1 Like