Npm run docs:build causing following errors

11:31:30 AM: Build ready to start

11:31:32 AM: build-image version: d2c6dbeac570350a387d832f64bc980dc964ad65 (focal)

11:31:32 AM: build-image tag: v4.8.0

11:31:32 AM: buildbot version: e552b142336b2b1222a93a4fd4cbed0019c77b46

11:31:33 AM: Fetching cached dependencies

11:31:33 AM: Failed to fetch cache, continuing with build

11:31:33 AM: Starting to prepare the repo for build

11:31:33 AM: No cached dependencies found. Cloning fresh repo

11:31:33 AM: git clone https://github.com/sachinbro/vue-project

11:31:34 AM: Preparing Git Reference refs/heads/main

11:31:34 AM: Parsing package.json dependencies

11:31:36 AM: Starting build script

11:31:36 AM: Installing dependencies

11:31:36 AM: Python version set to 2.7

11:31:37 AM: v16.14.2 is already installed.

11:31:38 AM: Now using node v16.14.2 (npm v8.5.0)

11:31:38 AM: Started restoring cached build plugins

11:31:38 AM: Finished restoring cached build plugins

11:31:38 AM: Attempting ruby version 2.7.2, read from environment

11:31:40 AM: Using ruby version 2.7.2

11:31:40 AM: Using PHP version 8.0

11:31:41 AM: No npm workspaces detected

11:31:41 AM: Started restoring cached node modules

11:31:41 AM: Finished restoring cached node modules

11:31:41 AM: Installing NPM modules using NPM version 8.5.0

11:32:01 AM: npm ERR! code EBADPLATFORM

11:32:01 AM: npm ERR! notsup Unsupported platform for esbuild-windows-64@0.14.36: wanted {“os”:“win32”,“arch”:“x64”} (current: {“os”:“linux”,“arch”:“x64”})

11:32:01 AM: npm ERR! notsup Valid OS: win32

11:32:01 AM: npm ERR! notsup Valid Arch: x64

11:32:01 AM: Creating deploy upload records

11:32:01 AM: npm ERR! notsup Actual OS: linux

11:32:01 AM: npm ERR! notsup Actual Arch: x64

11:32:01 AM: npm ERR! A complete log of this run can be found in:

11:32:01 AM: npm ERR! /opt/buildhome/.npm/_logs/2022-04-16T05_46_42_589Z-debug-0.log

11:32:01 AM: Error during NPM install

11:32:01 AM: Build was terminated: Build script returned non-zero exit code: 1

11:32:01 AM: Failing build: Failed to build site

11:32:01 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1 (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)

11:32:01 AM: Finished processing build request in 28.663048611s

Hey @YeeP

It appears there is a dependency that is incompatible with Netlify Build because it is looking for Windows. If you have a package-lock.json or yarn.lock file, removing it may solve the issue.

thank you for the reply.
I did that already but it is still giving me same error.
By the way I am using vite as package manager.

Are you able to share the repository you are deploying from?

No I can’t sorry. I have made it private.

OK, we won’t be able to help unless you can share a copy of the repo that is failing. The advice that @coelmay is the same advice that I would have given you without access to your source code, so you can decide if you want to help us help you debug or not :slight_smile: