skip to Main Content

An error occurs when you add a site from a GitHub repository and deploy it:

6:36:32 PM: Build ready to start
6:36:35 PM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63
6:36:35 PM: build-image tag: v3.3.2
6:36:35 PM: buildbot version: ef8d0929ed0baabafd8bbb7d0b021e1fc24180c0
6:36:35 PM: Fetching cached dependencies
6:36:35 PM: Failed to fetch cache, continuing with build
6:36:35 PM: Starting to prepare the repo for build
6:36:36 PM: No cached dependencies found. Cloning fresh repo
6:36:36 PM: git clone https://github.com/Thr0TT1e/huddle_landing_page
6:36:37 PM: Preparing Git Reference refs/heads/master
6:36:37 PM: Found netlify.toml. Overriding site configuration
6:36:37 PM: Starting build script
6:36:37 PM: Installing dependencies
6:36:39 PM: Downloading and installing node v10.16.2...
6:36:40 PM: Downloading https://nodejs.org/dist/v10.16.2/node-v10.16.2-linux-x64.tar.xz...
6:36:40 PM: 
#####
6:36:40 PM:   7.8%
6:36:40 PM: 
###############################################################
6:36:40 PM: ######### 100.0%
6:36:40 PM: Computing checksum with sha256sum
6:36:40 PM: Checksums matched!
6:36:43 PM: Now using node v10.16.2 (npm v6.9.0)
6:36:44 PM: Attempting ruby version 2.6.2, read from environment
6:36:46 PM: Using ruby version 2.6.2
6:36:47 PM: Using PHP version 5.6
6:36:47 PM: Started restoring cached node modules
6:36:47 PM: Finished restoring cached node modules
6:36:47 PM: Installing NPM modules using NPM version 6.9.0
6:36:49 PM: npm
6:36:49 PM: WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
6:36:53 PM: npm WARN deprecated [email protected]: This package is discontinued. Use lodash.iteratee@^4.0.0.
6:37:18 PM: > [email protected] install /opt/build/repo/node_modules/node-sass
6:37:18 PM: > node scripts/install.js
6:37:19 PM: Downloading binary from https://github.com/sass/node-sass/releases/download/v4.12.0/linux-x64-64_binding.node
6:37:21 PM: Download complete
6:37:21 PM: Binary saved to /opt/build/repo/node_modules/node-sass/vendor/linux-x64-64/binding.node
6:37:21 PM: Caching binary to /opt/buildhome/.npm/node-sass/4.12.0/linux-x64-64_binding.node
6:37:21 PM: > [email protected] postinstall /opt/build/repo/node_modules/node-sass
6:37:21 PM: > node scripts/build.js
6:37:22 PM: Binary found at /opt/build/repo/node_modules/node-sass/vendor/linux-x64-64/binding.node
6:37:22 PM: Testing binary
6:37:22 PM: Binary is fine
6:37:22 PM: > [email protected] postinstall /opt/build/repo/node_modules/gifsicle
6:37:22 PM: > node lib/install.js
6:37:23 PM:   ✔ gifsicle pre-build test passed successfully
6:37:23 PM: > [email protected] postinstall /opt/build/repo/node_modules/jpegtran-bin
6:37:23 PM: > node lib/install.js
6:37:24 PM:   ✔ jpegtran pre-build test passed successfully
6:37:24 PM: > [email protected] postinstall /opt/build/repo/node_modules/optipng-bin
6:37:24 PM: > node lib/install.js
6:37:24 PM:   ✔ optipng pre-build test passed successfully
6:37:25 PM: npm
6:37:25 PM: notice created a lockfile as package-lock.json. You should commit this file.
6:37:25 PM: npm WARN
6:37:25 PM:  [email protected] No repository field.
6:37:25 PM: npm WARN optional
6:37:25 PM:  SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
6:37:25 PM: npm WARN
6:37:25 PM: notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
6:37:25 PM: added 925 packages from 552 contributors and audited 14495 packages in 37.17s
6:37:25 PM: found 0 vulnerabilities
6:37:26 PM: NPM modules installed
6:37:26 PM: Started restoring cached go cache
6:37:26 PM: Finished restoring cached go cache
6:37:26 PM: unset GOOS;
6:37:26 PM: unset GOARCH;
6:37:26 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
6:37:26 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
6:37:26 PM: go version >&2;
6:37:26 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
6:37:26 PM: go version go1.12 linux/amd64
6:37:26 PM: Installing missing commands
6:37:26 PM: Verify run directory
6:37:26 PM: Executing user command: gulp build
6:37:28 PM: [15:37:28]
6:37:28 PM: Using gulpfile /opt/build/repo/gulpfile.js
6:37:28 PM: [15:37:28]
6:37:28 PM: Task never defined: build
6:37:28 PM: [15:37:28]
6:37:28 PM: To list available tasks, try running: gulp --tasks
6:37:28 PM: Skipping functions preparation step: no functions directory set
6:37:28 PM: Caching artifacts
6:37:28 PM: Started saving node modules
6:37:28 PM: Finished saving node modules
6:37:28 PM: Started saving pip cache
6:37:28 PM: Finished saving pip cache
6:37:28 PM: Started saving emacs cask dependencies
6:37:28 PM: Finished saving emacs cask dependencies
6:37:28 PM: Started saving maven dependencies
6:37:28 PM: Finished saving maven dependencies
6:37:28 PM: Started saving boot dependencies
6:37:28 PM: Finished saving boot dependencies
6:37:28 PM: Started saving go dependencies
6:37:28 PM: Finished saving go dependencies
6:37:38 PM: Error running command: Build script returned non-zero exit code: 1
6:37:38 PM: Failing build: Failed to build site
6:37:38 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
6:37:38 PM: Finished processing build request in 1m3.374187994s

netlify.toml

# global context
[build]
  publish = "dist"
  command = "gulp build"
# build a preview (optional)
[context.deploy-preview]
  command = "gulp build-preview"
# build a branch with debug (optional)
[context.branch-deploy]
  command = "gulp build-debug"

gulpfile.js – https://github.com/Thr0TT1e/huddle_landing_page/blob/master/gulpfile.js

What settings still need to properly build the project on Netlify? The project was built using gulp, I do not have a special task for the Assembly.

2

Answers


  1. Try adding a netlify.toml file in the root of your project. Inside the file add a route to point back to the root file. Something like:

    [[redirects]]
      from = "/"
      to = "/index.html"
      status = 200
    
    Login or Signup to reply.
  2. I am not sure if this is the same issue, but when I was trying to deploy a repository that had the gulpfile in it, I kept getting build errors, 404 messages, or sites with no css on them.

    If you are using gulp to compile node_modules like I was by using the gulpfile.js running the gulp command, then what you need to do is just upload the app folder files into a repository and deploy that repository.

    https://themesberg.com/blog/tutorial/gulp-4-bootstrap-sass-browsersync

    I followed this site to get the gulp setup to use SASS and bootstrap.
    This has you set up an app folder that will house the compiled gulp code. It is the files and folders inside the app folder that you will upload to a repository and deploy on netlify.

    Here is my repositories for an example:
    https://github.com/alexgant/CITPT217-redesign-weiner-works <– repository housing all code including gulpfile.js

    https://github.com/alexgant/weinerworks <– repository housing only the app folders from the repository above.

    https://weinerworks-alexis-gantz.netlify.app/ <–here is my working Netlify site using the 2nd repository listed.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search