Build Ignore Command Not Working?

Ok, I feel like this seems like such a simple thing, either I’m doing something incredibly wrong, or missing something in plain site.

I have a site in Netlify. In the root of the repo for that site is a netlify.toml file that looks like this:

  base = "./"
  publish = "./build/"
  command = "npm run build"
  ignore = "./scripts/"
  environment = { NODE_VERSION = "14" }

For some reason which I cannot understand, the build.ignore command is not running. The build seems to be doing it’s thing and not even realizing there is an ignore command.

In other repos where I use the ignore command, the build always outputs something in the log to say “hey I detected an ignore command, I’m going to run it…” and logs something like this:

9:27:21 PM: Detected ignore command in Netlify configuration file. Proceeding with the specified command:

But in this repo I’m working with, it doesn’t seem to be detecting the (clearly present) ignore command at all because A) it’s not skipping builds when it’s supposed to, but more obviously B) it’s not even outputting anything in that log that an ignore command is being detected.

What am I doing wrong??

  • Site name: watchosicongallery
  • Full build log
2:25:19 PM: Build ready to start
2:26:03 PM: build-image version: 8e315e54bc4032a32e73290be556cde4f8348c12
2:26:03 PM: build-image tag: v2.8.2
2:26:03 PM: buildbot version: 45cd00068410d70db72c9672cdd014995488e12a
2:26:04 PM: Fetching cached dependencies
2:26:04 PM: Starting to download cache of 249.3MB
2:26:08 PM: Finished downloading cache in 4.569078589s
2:26:08 PM: Starting to extract cache
2:26:19 PM: Finished extracting cache in 11.118385678s
2:26:19 PM: Finished fetching cache in 15.851576992s
2:26:19 PM: Starting to prepare the repo for build
2:26:20 PM: Preparing Git Reference refs/heads/master
2:26:21 PM: Found netlify.toml. Overriding site configuration
2:26:21 PM: Different publish path detected, going to use the one specified in the toml file: './build/' versus '' in the site
2:26:21 PM: Different build command detected, going to use the one specified in the toml file: 'npm run build' versus '' in the site
2:26:21 PM: Different base path detected, going to use the one specified in the toml file: './' versus '' in the site
2:26:21 PM: Starting build script
2:26:22 PM: Installing dependencies
2:26:22 PM: Started restoring cached node version
2:26:26 PM: Finished restoring cached node version
2:26:27 PM: v14.8.0 is already installed.
2:26:29 PM: Now using node v14.8.0 (npm v6.14.7)
2:26:29 PM: Attempting ruby version 2.7.1, read from environment
2:26:30 PM: Started restoring cached ruby version
2:26:30 PM: Finished restoring cached ruby version
2:26:33 PM: Using ruby version 2.7.1
2:26:34 PM: Using PHP version 5.6
2:26:34 PM: Started restoring cached node modules
2:26:34 PM: Finished restoring cached node modules
2:26:35 PM: Started restoring cached go cache
2:26:38 PM: Finished restoring cached go cache
2:26:38 PM: Installing Go version 1.14.4
2:26:38 PM: unset GOOS;
2:26:38 PM: unset GOARCH;
2:26:38 PM: export GOROOT='/opt/buildhome/.gimme_cache/versions/go1.14.4.linux.amd64';
2:26:38 PM: export PATH="/opt/buildhome/.gimme_cache/versions/go1.14.4.linux.amd64/bin:${PATH}";
2:26:38 PM: go version >&2;
2:26:38 PM: export GIMME_ENV='/opt/buildhome/.gimme_cache/env/go1.14.4.linux.amd64.env';
2:26:38 PM: go version go1.14.4 linux/amd64
2:26:38 PM: Installing missing commands
2:26:38 PM: Verify run directory
2:26:38 PM: Executing user command: npm run build
2:26:39 PM: > icon-galleries@ build /opt/build/repo
2:26:39 PM: > TZ=UTC NODE_ENV=production DEBUG=* node src/metalsmith.js
2:26:39 PM: 2020-08-11T20:26:39.981Z metalsmith start
2:26:40 PM: 2020-08-11T20:26:40.130Z plugin-add-icon-metadata start
2:26:40 PM: 2020-08-11T20:26:40.187Z plugin-add-icon-metadata finish: processed 198 icons
2:26:40 PM: 2020-08-11T20:26:40.188Z plugin-create-icon-collection start
2:26:40 PM: 2020-08-11T20:26:40.235Z plugin-create-icon-collection finish: 198 icons
2:26:40 PM: 2020-08-11T20:26:40.235Z plugin-paginate start
2:26:40 PM: 2020-08-11T20:26:40.241Z plugin-paginate finish: 6 pages (/index.html, /p/2 -> /p/6)
2:26:40 PM: 2020-08-11T20:26:40.241Z plugin-render-templates start
2:26:40 PM: 2020-08-11T20:26:40.392Z plugin-render-templates finish: processed 198 icons, 12 .js templates
2:26:40 PM: 2020-08-11T20:26:40.481Z metalsmith finish: processed 237 files
2:26:40 PM: Skipping functions preparation step: no functions directory set
2:26:40 PM: Caching artifacts
2:26:40 PM: Started saving node modules
2:26:40 PM: Finished saving node modules
2:26:40 PM: Started saving pip cache
2:26:42 PM: Finished saving pip cache
2:26:42 PM: Started saving emacs cask dependencies
2:26:43 PM: Finished saving emacs cask dependencies
2:26:43 PM: Started saving maven dependencies
2:26:44 PM: Finished saving maven dependencies
2:26:44 PM: Started saving boot dependencies
2:26:45 PM: Finished saving boot dependencies
2:26:46 PM: Started saving go dependencies
2:26:48 PM: Finished saving go dependencies
2:26:48 PM: Build script success
2:26:48 PM: Starting to deploy site from './build/'
2:26:48 PM: Creating deploy tree 
2:26:48 PM: Creating deploy upload records
2:26:48 PM: 2 new files to upload
2:26:48 PM: 0 new functions to upload
2:26:50 PM: Starting post processing
2:26:50 PM: Post processing - HTML
2:26:54 PM: Post processing - header rules
2:26:54 PM: Post processing - redirect rules
2:26:55 PM: Post processing done
2:26:55 PM: Site is live
2:27:37 PM: Finished processing build request in 1m33.364736443s

I had relinked my repository but apparently I needed to also update the build image to xenial. Now it works!

1 Like

Hi, @jimniels, thank you for the follow-up to share your solution.

This helps make the community more useful for people searching for answers here and we (meaning the team here at Netlify) appreciate you taking the time to do this. (I’m sure people searching will appreciate it also.) :+1:

1 Like