Build fails because of apparently unsupported os?

Hello everybody. I just switched from Jekyll to Eleventy for my personal website (source code). I changed the deploy command from jekyll build to npm start, and I triggered a deploy without the cache. Nevertheless, the build fails with the following log:

2:42:46 PM: Build ready to start
2:42:48 PM: build-image version: 195fbe127e5c374d9c4758652cb62e3b8936a395 (focal)
2:42:48 PM: build-image tag: v4.6.0
2:42:48 PM: buildbot version: 4ac77ee15240cafa5a14a04b6ca18d8959fa98e6
2:42:48 PM: Fetching cached dependencies
2:42:48 PM: Failed to fetch cache, continuing with build
2:42:48 PM: Starting to prepare the repo for build
2:42:49 PM: No cached dependencies found. Cloning fresh repo
2:42:49 PM: git clone https://github.com/xplosionmind/xplosionmind
2:43:00 PM: Preparing Git Reference refs/heads/main
2:43:27 PM: Parsing package.json dependencies
2:43:28 PM: Starting build script
2:43:28 PM: Installing dependencies
2:43:28 PM: Python version set to 2.7
2:43:29 PM: Downloading and installing node v10.24.1...
2:43:29 PM: Downloading https://nodejs.org/dist/v10.24.1/node-v10.24.1-linux-x64.tar.xz...
2:43:29 PM: Computing checksum with sha256sum
2:43:30 PM: Checksums matched!
2:43:31 PM: Now using node v10.24.1 (npm v6.14.12)
2:43:31 PM: Started restoring cached build plugins
2:43:31 PM: Finished restoring cached build plugins
2:43:31 PM: Attempting ruby version 2.6.2, read from environment
2:43:32 PM: Required ruby-2.6.2 is not installed - installing.
2:43:33 PM: Searching for binary rubies, this might take some time.
2:43:33 PM: Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/20.04/x86_64/ruby-2.6.2.tar.bz2
2:43:33 PM: Checking requirements for ubuntu.
2:43:33 PM: Requirements installation successful.
2:43:34 PM: ruby-2.6.2 - #configure
2:43:34 PM: ruby-2.6.2 - #download
2:43:34 PM: ruby-2.6.2 - #validate archive
2:43:39 PM: ruby-2.6.2 - #extract
2:43:41 PM: ruby-2.6.2 - #validate binary
2:43:42 PM: ruby-2.6.2 - #setup
2:43:42 PM: ruby-2.6.2 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.6.2@global
2:43:42 PM: ruby-2.6.2 - #importing gemset /opt/buildhome/.rvm/gemsets/global.gems........................................
2:43:43 PM: ruby-2.6.2 - #generating global wrappers........
2:43:43 PM: ruby-2.6.2 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.6.2
2:43:43 PM: ruby-2.6.2 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list
2:43:43 PM: ruby-2.6.2 - #generating default wrappers........
2:43:44 PM: Using /opt/buildhome/.rvm/gems/ruby-2.6.2
2:43:44 PM: Using ruby version 2.6.2
2:43:44 PM: Using PHP version 8.0
2:43:44 PM: Started restoring cached node modules
2:43:44 PM: Finished restoring cached node modules
2:43:45 PM: Installing NPM modules using NPM version 6.14.12
2:43:55 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
2:43:55 PM: npm ERR! notsup Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2:43:55 PM: npm ERR! notsup Valid OS:    darwin
2:43:55 PM: npm ERR! notsup Valid Arch:  any
2:43:55 PM: npm ERR! notsup Actual OS:   linux
2:43:55 PM: Creating deploy upload records
2:43:55 PM: npm ERR! notsup Actual Arch: x64
2:43:55 PM: npm ERR! A complete log of this run can be found in:
2:43:55 PM: npm ERR!     /opt/buildhome/.npm/_logs/2022-03-23T13_43_55_215Z-debug.log
2:43:55 PM: Error during NPM install
2:43:55 PM: Build was terminated: Build script returned non-zero exit code: 1
2:43:55 PM: Failing build: Failed to build site
2:43:55 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1 (https://ntl.fyi/exit-code-1)
2:43:55 PM: Finished processing build request in 1m7.035181548s

Could you please help me in pinpointing the problem?

Thank you very much!

hey tommi, does this build locally properly?

1 Like

Thanks for your answer!
Yes, locally it builds correctly.

this smells like a temporary error.

what happens when you choose “clear cache and redeploy”? :thinking:

I even reconfigured a new repository from scratch! I cleaned everything but still an error appears…

New log:

7:42:19 PM: Build ready to start
7:42:20 PM: build-image version: 195fbe127e5c374d9c4758652cb62e3b8936a395 (focal)
7:42:20 PM: build-image tag: v4.6.0
7:42:20 PM: buildbot version: 4ac77ee15240cafa5a14a04b6ca18d8959fa98e6
7:42:21 PM: Building without cache
7:42:21 PM: Starting to prepare the repo for build
7:42:22 PM: No cached dependencies found. Cloning fresh repo
7:42:22 PM: git clone git@codeberg.org:tommi/tommi.space.git
7:42:28 PM: Preparing Git Reference refs/heads/main
7:42:32 PM: Parsing package.json dependencies
7:42:33 PM: Starting build script
7:42:33 PM: Installing dependencies
7:42:33 PM: Python version set to 2.7
7:42:33 PM: Downloading and installing node v16.14.2...
7:42:33 PM: Downloading https://nodejs.org/dist/v16.14.2/node-v16.14.2-linux-x64.tar.xz...
7:42:34 PM: Computing checksum with sha256sum
7:42:34 PM: Checksums matched!
7:42:37 PM: Now using node v16.14.2 (npm v8.5.0)
7:42:37 PM: Started restoring cached build plugins
7:42:37 PM: Finished restoring cached build plugins
7:42:37 PM: Attempting ruby version 2.7.2, read from environment
7:42:38 PM: Using ruby version 2.7.2
7:42:38 PM: Using PHP version 8.0
7:42:38 PM: Started restoring cached node modules
7:42:38 PM: Finished restoring cached node modules
7:42:38 PM: Installing NPM modules using NPM version 8.5.0
7:42:39 PM: npm ERR! code EBADPLATFORM
7:42:39 PM: npm ERR! notsup Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin"} (current: {"os":"linux","arch":"x64"})
7:42:39 PM: npm ERR! notsup Valid OS:    darwin
7:42:39 PM: npm ERR! notsup Valid Arch:  undefined
7:42:39 PM: Creating deploy upload records
7:42:39 PM: npm ERR! notsup Actual OS:   linux
7:42:39 PM: npm ERR! notsup Actual Arch: x64
7:42:39 PM: npm ERR! A complete log of this run can be found in:
7:42:39 PM: npm ERR!     /opt/buildhome/.npm/_logs/2022-03-23T18_42_39_085Z-debug-0.log
7:42:39 PM: Error during NPM install
7:42:40 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1 (https://ntl.fyi/exit-code-1)
7:42:39 PM: Build was terminated: Build script returned non-zero exit code: 1
7:42:40 PM: Failing build: Failed to build site
7:42:40 PM: Finished processing build request in 19.341776967s

I found the solution!

It was actually a OS problem, and I went in my package-lock.json file, reaching the part where darwin was specified. I added linux, as follows:

    "node_modules/fsevents": {
      "version": "2.3.2",
      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
      "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
      "hasInstallScript": true,
      "os": [
        "darwin",
        "linux"
      ],
      "engines": {
        "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
      }
    },
1 Like

Thanks for coming back and letting us know! Happy building :rocket:

1 Like

Sorry for linking this thread in many other ones, @hillary… they reported the same identical issue, yet they were without any solution. I felt compelled to share progress. Thanks for noting how to manage this next time!

T

1 Like

Absolutely! We are glad you’re here :netliconfetti:

1 Like