Error during NPM install

netlify site name: https://competent-leavitt-d07bc6.netlify.app/

This is a Gatsby project that compiled Today at 4:20 PM
Then failed Today at 4:54 PM
ON THE SAME repo commit SHA
This makes no sense to me. Any help would be appreciated.

Add modal ovelays for product pages

Not DNS related

4:58:12 PM: Build ready to start
4:58:13 PM: build-image version: 0582042f4fc261adc7bd8333f34884959c577302
4:58:13 PM: build-image tag: v3.7.6
4:58:13 PM: buildbot version: 959f79c81bbea9aec6ed0f9e457edb5817a4dfe6
4:58:13 PM: Building without cache
4:58:13 PM: Starting to prepare the repo for build
4:58:14 PM: No cached dependencies found. Cloning fresh repo
4:58:14 PM: git clone git@gitlab.com:witcradg/gatsby-d8g
4:58:16 PM: Preparing Git Reference refs/heads/master
4:58:17 PM: Parsing package.json dependencies
4:58:18 PM: Starting build script
4:58:18 PM: Installing dependencies
4:58:18 PM: Python version set to 2.7
4:58:19 PM: v12.18.0 is already installed.
4:58:19 PM: Now using node v12.18.0 (npm v6.14.4)
4:58:19 PM: Started restoring cached build plugins
4:58:19 PM: Finished restoring cached build plugins
4:58:20 PM: Attempting ruby version 2.7.1, read from environment
4:58:21 PM: Using ruby version 2.7.1
4:58:21 PM: Using PHP version 5.6
4:58:21 PM: Started restoring cached node modules
4:58:21 PM: Finished restoring cached node modules

4:58:21 PM: Installing NPM modules using NPM version 6.14.4
4:58:26 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!
npm ERR! code EBADPLATFORM
4:58:26 PM: npm ERR! notsup Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
4:58:26 PM: npm ERR! notsup Valid OS:    darwin
4:58:26 PM: npm ERR! notsup Valid Arch:  any
4:58:26 PM: npm ERR! notsup Actual OS:   linux
4:58:26 PM: npm ERR! notsup Actual Arch: x64
4:58:26 PM: npm ERR! A complete log of this run can be found in:
4:58:26 PM: npm ERR!     /opt/buildhome/.npm/_logs/2021-05-30T23_58_26_174Z-debug.log
4:58:26 PM: Error during NPM install

4:58:26 PM: Build was terminated: Build script returned non-zero exit code: 1
4:58:26 PM: Creating deploy upload records
4:58:26 PM: Failing build: Failed to build site
4:58:26 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1
4:58:26 PM: Finished processing build request in 12.508035322s

1 Like

FIXED.
After sleeping on it and doing an upgrade of all my packages with ncu, I’m getting a clean build this morning. I’m not if this was what fixed it but it works now.

2 Likes

Thanks for circling back and sharing this, @witcradg :netliconfetti:

2 Likes

Hi! I am having the exact same error that you had, with the same identical npm module and version. Nevertheless, not even with ncu the problem appears to be solved… do you have any suggestions?

My website source code is here, while the original post of my build error, along with all the logs, is here

Thanks a lot in advance!

Best,
Tommi

Is there a reson you’re using v10 of nodejs? I’m now using v16. I’ve had problems in the past when I don’t keep my node version up to date. Especially when I update package.json.

Is there something I should do except running npx npm-check-updates and npm update?

I have no idea if this will help but I’d use nvm and upgrade to node v16. I’d recommend against v17 for now.

Hey @tommi

There are multiple ways to set the Node.js version for a build. Check out

Agree with @witcradg’s recommendation of v16.

1 Like