Home
Support Forums

Having trouble deploying my site from github

  • I am having trouble deploying mysite it want showup . website: Landkit-website.netlify.app

Hiya, sorry you are having trouble with your build.

This Support Guide contains a ton of useful debugging tips that can likely help you solve your problem :slight_smile:

We also recommend trying to search the forums with the build error you encountered - it’s likely your question was already asked by someone else!

If you are still having problems, please provide as much information as you can on what you have already tried, what your build settings are, your package.json, etc. Thanks!

Thanks perry I will check out the support guide as well as search the forums and if I am still having trouble I will reach out again

Does my repo has to be public for me to be able to deploy to netlify? Current the repo is private.

No. You don’t need the repo to be public.

If you post the build log, maybe someone can help you figure out what’s going wrong.

9:51:52 AM: Build ready to start
9:51:54 AM: build-image version: 09c2cdcdf242cf2f57c9ee0fcad9d298fad9ad41
9:51:54 AM: build-image tag: v3.5.0
9:51:54 AM: buildbot version: 8df8a50b1177b0b57364d20e0ea150448924cebf
9:51:54 AM: Fetching cached dependencies
9:51:54 AM: Starting to download cache of 119.1MB
9:51:55 AM: Finished downloading cache in 1.199828134s
9:51:55 AM: Starting to extract cache
9:52:01 AM: Finished extracting cache in 5.588460184s
9:52:01 AM: Finished fetching cache in 6.823583113s
9:52:01 AM: Starting to prepare the repo for build
9:52:01 AM: Preparing Git Reference refs/heads/main
9:52:03 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: β€˜public’ versus β€˜public/’ in the Netlify UI
9:52:03 AM: Starting build script
9:52:03 AM: Installing dependencies
9:52:03 AM: Python version set to 2.7
9:52:04 AM: Started restoring cached node version
9:52:06 AM: Finished restoring cached node version
9:52:07 AM: v12.18.0 is already installed.
9:52:08 AM: Now using node v12.18.0 (npm v6.14.4)
9:52:08 AM: Started restoring cached build plugins
9:52:08 AM: Finished restoring cached build plugins
9:52:08 AM: Attempting ruby version 2.7.1, read from environment
9:52:10 AM: Using ruby version 2.7.1
9:52:10 AM: Using PHP version 5.6
9:52:10 AM: Started restoring cached node modules
9:52:10 AM: Finished restoring cached node modules
9:52:10 AM: Installing NPM modules using NPM version 6.14.4
9:52:30 AM: > sharp@0.25.4 install /opt/build/repo/node_modules/sharp
9:52:30 AM: > (node install/libvips && node install/dll-copy && prebuild-install --runtime=napi) || (node-gyp rebuild && node install/dll-copy)
9:52:31 AM: info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.9.1/libvips-8.9.1-linux-x64.tar.gz
9:52:33 AM: > node-sass@4.14.1 install /opt/build/repo/node_modules/node-sass
9:52:33 AM: > node scripts/install.js
9:52:34 AM: Downloading binary from https://github.com/sass/node-sass/releases/download/v4.14.1/linux-x64-72_binding.node
9:52:34 AM: Download complete
9:52:34 AM: Binary saved to /opt/build/repo/node_modules/node-sass/vendor/linux-x64-72/binding.node
9:52:34 AM: Caching binary to /opt/buildhome/.npm/node-sass/4.14.1/linux-x64-72_binding.node
9:52:35 AM: > mozjpeg@7.0.0 postinstall /opt/build/repo/node_modules/mozjpeg
9:52:35 AM: > node lib/install.js
9:52:35 AM: :heavy_check_mark: mozjpeg pre-build test passed successfully
9:52:35 AM: > pngquant-bin@6.0.0 postinstall /opt/build/repo/node_modules/pngquant-bin
9:52:35 AM: > node lib/install.js
9:52:35 AM: :heavy_check_mark: pngquant pre-build test passed successfully
9:52:35 AM: > node-sass@4.14.1 postinstall /opt/build/repo/node_modules/node-sass
9:52:35 AM: > node scripts/build.js
9:52:36 AM: Binary found at /opt/build/repo/node_modules/node-sass/vendor/linux-x64-72/binding.node
9:52:36 AM: Testing binary
9:52:36 AM: Binary is fine
9:52:38 AM: npm WARN @typescript-eslint/eslint-plugin@2.34.0 requires a peer of eslint@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
9:52:38 AM: npm WARN @typescript-eslint/parser@2.34.0 requires a peer of eslint@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
9:52:38 AM: npm WARN eslint-config-react-app@5.2.1 requires a peer of eslint@6.x but none is installed. You must install peer dependencies yourself.
9:52:38 AM: npm WARN eslint-plugin-react-hooks@1.7.0 requires a peer of eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
9:52:38 AM: npm WARN tsutils@3.17.1 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
9:52:38 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):
9:52:38 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {β€œos”:β€œdarwin”,β€œarch”:β€œany”} (current: {β€œos”:β€œlinux”,β€œarch”:β€œx64”})
9:52:38 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/chokidar/node_modules/fsevents):
9:52:38 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {β€œos”:β€œdarwin”,β€œarch”:β€œany”} (current: {β€œos”:β€œlinux”,β€œarch”:β€œx64”})
9:52:38 AM: added 438 packages from 387 contributors, removed 4 packages, updated 10 packages and audited 2303 packages in 26.924s
9:52:40 AM: 147 packages are looking for funding
9:52:40 AM: run npm fund for details
9:52:40 AM: found 0 vulnerabilities
9:52:40 AM: NPM modules installed
9:52:40 AM: Started restoring cached go cache
9:52:40 AM: Finished restoring cached go cache
9:52:40 AM: go version go1.14.4 linux/amd64
9:52:40 AM: go version go1.14.4 linux/amd64
9:52:40 AM: Installing missing commands
9:52:40 AM: Verify run directory
9:52:42 AM: ​
9:52:42 AM: ────────────────────────────────────────────────────────────────
9:52:42 AM: Netlify Build
9:52:42 AM: ────────────────────────────────────────────────────────────────
9:52:42 AM: ​
9:52:42 AM: ❯ Version
9:52:42 AM: @netlify/build 5.3.3
9:52:42 AM: ​
9:52:42 AM: ❯ Flags
9:52:42 AM: deployId: 5fc507080e32182aeed48948
9:52:42 AM: mode: buildbot
9:52:42 AM: ​
9:52:42 AM: ❯ Current directory
9:52:42 AM: /opt/build/repo
9:52:42 AM: ​
9:52:42 AM: ❯ Config file
9:52:42 AM: No config file was defined: using default values.
9:52:42 AM: ​
9:52:42 AM: ❯ Context
9:52:42 AM: production
9:52:42 AM: ​
9:52:42 AM: ────────────────────────────────────────────────────────────────
9:52:42 AM: 1. Build command from Netlify app
9:52:42 AM: ────────────────────────────────────────────────────────────────
9:52:42 AM: ​
9:52:42 AM: $ npm run build
9:52:42 AM: > gatsby-starter-hello-world@0.1.0 build /opt/build/repo
9:52:42 AM: > gatsby build
9:52:46 AM: success open and validate gatsby-configs - 0.011s
9:52:46 AM: success load plugins - 0.108s
9:52:46 AM: success onPreInit - 0.030s
9:52:46 AM: success delete html and css files from previous builds - 0.003s
9:52:46 AM: success initialize cache - 0.007s
9:52:46 AM: success copy gatsby files - 0.033s
9:52:46 AM: success onPreBootstrap - 0.020s
9:52:46 AM: success createSchemaCustomization - 0.001s
9:52:46 AM: success Checking for changed pages - 0.000s
9:52:46 AM: success source and transform nodes - 0.053s
9:52:46 AM: success building schema - 0.237s
9:52:46 AM: info Total nodes: 20, SitePage nodes: 1 (use --verbose for breakdown)
9:52:46 AM: success createPages - 0.001s
9:52:46 AM: success Checking for changed pages - 0.000s
9:52:46 AM: error You have an empty file in the β€œsrc/pages” directory at β€œsrc/pages/checkout.js”. Please remove it or make it a valid component
9:52:46 AM: not finished createPagesStatefully - 0.047s
9:52:46 AM: npm ERR! code ELIFECYCLE
9:52:46 AM: npm ERR! errno 1
9:52:46 AM: npm ERR! gatsby-starter-hello-world@0.1.0 build: gatsby build
9:52:46 AM: npm ERR! Exit status 1
9:52:46 AM: npm ERR!
9:52:46 AM: npm ERR! Failed at the gatsby-starter-hello-world@0.1.0 build script.
9:52:46 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
9:52:46 AM: npm ERR! A complete log of this run can be found in:
9:52:46 AM: npm ERR! /opt/buildhome/.npm/_logs/2020-11-30T14_52_46_762Z-debug.log
9:52:46 AM: ​
9:52:46 AM: ────────────────────────────────────────────────────────────────
9:52:46 AM: β€œbuild.command” failed
9:52:46 AM: ────────────────────────────────────────────────────────────────
9:52:46 AM: ​
9:52:46 AM: Error message
9:52:46 AM: Command failed with exit code 1: npm run build
9:52:46 AM: ​
9:52:46 AM: Error location
9:52:46 AM: In Build command from Netlify app:
9:52:46 AM: npm run build
9:52:46 AM: ​
9:52:46 AM: Resolved config
9:52:46 AM: build:
9:52:46 AM: command: npm run build
9:52:46 AM: commandOrigin: ui
9:52:46 AM: publish: /opt/build/repo/public
9:52:46 AM: Caching artifacts
9:52:46 AM: Started saving node modules
9:52:46 AM: Finished saving node modules
9:52:46 AM: Started saving build plugins
9:52:46 AM: Finished saving build plugins
9:52:46 AM: Started saving pip cache
9:52:47 AM: Finished saving pip cache
9:52:47 AM: Started saving emacs cask dependencies
9:52:47 AM: Finished saving emacs cask dependencies
9:52:47 AM: Started saving maven dependencies
9:52:47 AM: Finished saving maven dependencies
9:52:47 AM: Started saving boot dependencies
9:52:47 AM: Finished saving boot dependencies
9:52:47 AM: Started saving go dependencies
9:52:47 AM: Finished saving go dependencies
9:52:47 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
9:52:47 AM: Failing build: Failed to build site
9:52:47 AM: Failed during stage β€˜building site’: Build script returned non-zero exit code: 2
9:52:47 AM: Finished processing build request in 52.813418819s

This line mentions the error.

Going to update now commit and push to github and try to deploy again.

Thank when I made sure that component worked the site was able to deploy correctly.