Build fails even though same git repo builds

hi, I have two of the same repo being built. My test was building fine but my live one keeps failing on build. certain modules aren’t found and they are not in my package.json. So I go and npm uninstall locally and push again and it still breaks. I have tried this three times now. The module that breaks the build is not a dependency or in my package.json. It also builds locally. Below is my log:


Retry deploy
Deploy log



3:02:39 PM: Build ready to start
3:02:41 PM: build-image version: dd2f6d8803393d46ac35a4f752a5a46f254c0300
3:02:41 PM: build-image tag: v3.9.1
3:02:41 PM: buildbot version: 0966611527937161c7edcafc1347bc5a61d77108
3:02:41 PM: Fetching cached dependencies
3:02:41 PM: Starting to download cache of 399.3MB
3:02:44 PM: Finished downloading cache in 2.752714022s
3:02:44 PM: Starting to extract cache
3:03:00 PM: Finished extracting cache in 16.318399755s
3:03:00 PM: Finished fetching cache in 19.175648736s
3:03:00 PM: Starting to prepare the repo for build
3:03:01 PM: Preparing Git Reference refs/heads/master
3:03:02 PM: Parsing package.json dependencies
3:03:03 PM: Starting build script
3:03:03 PM: Installing dependencies
3:03:03 PM: Python version set to 2.7
3:03:04 PM: Started restoring cached node version
3:03:07 PM: Finished restoring cached node version
3:03:07 PM: v10.24.1 is already installed.
3:03:08 PM: Now using node v10.24.1 (npm v6.14.12)
3:03:08 PM: Started restoring cached build plugins
3:03:08 PM: Finished restoring cached build plugins
3:03:08 PM: Attempting ruby version 2.6.2, read from environment
3:03:10 PM: Using ruby version 2.6.2
3:03:10 PM: Using PHP version 5.6
3:03:10 PM: Started restoring cached node modules
3:03:10 PM: Finished restoring cached node modules
3:03:10 PM: Installing NPM modules using NPM version 6.14.12
3:04:11 PM: 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!
3:04:11 PM: > sharp@0.29.1 install /opt/build/repo/node_modules/sharp
3:04:11 PM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
3:04:13 PM: sharp: Installation error: Expected Node.js version >=12.13.0 but found 10.24.1
3:04:13 PM: sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
3:04:18 PM: Creating deploy upload records
3:04:18 PM: npm WARN redux-notifications@4.0.1 requires a peer of react@^0.14.0 || ^15.0.0-0 || ^15.4.0-0 || ^16.0.0-0 but none is installed. You must install peer dependencies yourself.
3:04:18 PM: npm WARN redux-notifications@4.0.1 requires a peer of react-dom@^0.14.0 || ^15.0.0-0 || ^15.4.0-0 || ^16.0.0-0 but none is installed. You must install peer dependencies yourself.
3:04:18 PM: npm WARN react-redux@4.4.10 requires a peer of react@^0.14.0 || ^15.0.0-0 || ^15.4.0-0 || ^16.0.0-0 but none is installed. You must install peer dependencies yourself.
3:04:18 PM: npm WARN react-redux@4.4.10 requires a peer of redux@^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
3:04:18 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1
3:04:18 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
3:04:18 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
3:04:18 PM: npm ERR! code ELIFECYCLE
3:04:18 PM: npm ERR! errno 1
3:04:18 PM: npm ERR! sharp@0.29.1 install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)`
3:04:18 PM: npm ERR! Exit status 1
3:04:18 PM: npm ERR!
3:04:18 PM: npm ERR! Failed at the sharp@0.29.1 install script.
3:04:18 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
3:04:18 PM: npm ERR! A complete log of this run can be found in:
3:04:18 PM: npm ERR!     /opt/buildhome/.npm/_logs/2021-10-07T21_04_18_071Z-debug.log
3:04:18 PM: Error during NPM install
3:04:18 PM: Build was terminated: Build script returned non-zero exit code: 1
3:04:18 PM: Failing build: Failed to build site
3:04:18 PM: Finished processing build request in 1m37.372573868s

You’re using an outdated Node Version for some reason. Please use a newer version following these docs: Manage build dependencies | Netlify Docs

1 Like

thanks, yes I had to update all my packages and create an nvmrc file to use the proper node package on netlify even though local was using it