Home
Support Forums

Eleventy & Netlify - Build Fails (netlify.toml + can't find eleventy command)

Trying to get a build to work for Eleventy, but consistently errors with a message that suggests its coming from the netlify.toml file and user error, although it also mentions it can’t find the eleventy command.

Site is french.plus (or frenchplus.netlify.app), and the latest failed deploy log is below.

Any helpful suggestions on how to get this build working?

Many thanks in advance!

9:21:12 PM: Build ready to start
9:21:14 PM: build-image version: c6001ed68662a13e5deb24abec2b46058c58248a
9:21:14 PM: build-image tag: v3.9.0
9:21:14 PM: buildbot version: 1ed4041128c7c024b4c4b72e2ad30a0740c570a7
9:21:14 PM: Fetching cached dependencies
9:21:14 PM: Failed to fetch cache, continuing with build
9:21:14 PM: Starting to prepare the repo for build
9:21:14 PM: No cached dependencies found. Cloning fresh repo
9:21:14 PM: git clone https://github.com/koitaki/french.plus
9:21:17 PM: Preparing Git Reference refs/heads/prod
9:21:18 PM: Parsing package.json dependencies
9:21:18 PM: ​❯ Initial build environmentbaseRelDir: truebranch: prodcontext: productioncwd: /opt/build/repofeatureFlags: mode: buildbotrepositoryRoot: /opt/build/repositeId: 5ee31735-1a03-4fdc-b840-c4bb4a1e8729​❯ UI build settingsbaseRelDir: truebuild: command: build environment: - GOOGLE_PRIVATE_KEY - GOOGLE_SERVICE_ACCOUNT_EMAIL - NETLIFY_BUILD_DEBUG - NODE_ENV publish: dist​❯ Resolved build environmentbranch: prodbuildDir: /opt/build/repoconfigPath: /opt/build/repo/netlify.tomlcontext: productionenv: ​❯ Resolved configbuild: command: npm run build commandOrigin: config environment: - GOOGLE_PRIVATE_KEY - GOOGLE_SERVICE_ACCOUNT_EMAIL - NETLIFY_BUILD_DEBUG - NODE_ENV publish: /opt/build/repo/dist publishOrigin: configheaders: - for: /* values: Referrer-Policy: no-referrer-when-downgrade X-Content-Type-Options: nosniff X-Frame-Options: DENY X-XSS-Protection: 1; mode=blockheadersOrigin: configredirects: - force: true from: / status: 302 to: /under-construction/ - force: true from: Under Construction - French Plus status: 302 to: Under Construction - French Plus - from: '’ status: 404 to: /404redirectsOrigin: config
9:21:18 PM: Different build command detected, going to use the one specified in the Netlify configuration file: ‘npm run build’ versus ‘build’ in the Netlify UI
9:21:19 PM: Starting build script
9:21:19 PM: Installing dependencies
9:21:19 PM: Python version set to 2.7
9:21:51 PM: v12.18.0 is already installed.
9:21:52 PM: Now using node v12.18.0 (npm v6.14.4)
9:21:52 PM: Started restoring cached build plugins
9:21:52 PM: Finished restoring cached build plugins
9:21:52 PM: Attempting ruby version 2.7.1, read from environment
9:21:53 PM: Required ruby-2.7.1 is not installed - installing.
9:21:53 PM: Searching for binary rubies, this might take some time.
9:21:53 PM: Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/16.04/x86_64/ruby-2.7.1.tar.bz2
9:21:53 PM: Checking requirements for ubuntu.
9:21:54 PM: Requirements installation successful.
9:21:54 PM: ruby-2.7.1 - #configure
9:21:54 PM: ruby-2.7.1 - #download
9:21:55 PM: ruby-2.7.1 - #validate archive
9:21:59 PM: ruby-2.7.1 - #extract
9:22:01 PM: ruby-2.7.1 - #validate binary
9:22:02 PM: ruby-2.7.1 - #setup
9:22:03 PM: ruby-2.7.1 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.7.1@global
9:22:03 PM: ruby-2.7.1 - #importing gemset /opt/buildhome/.rvm/gemsets/global.gems…
9:22:03 PM: ruby-2.7.1 - #generating global wrappers…
9:22:03 PM: ruby-2.7.1 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.7.1
9:22:03 PM: ruby-2.7.1 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list
9:22:04 PM: ruby-2.7.1 - #generating default wrappers…
9:22:04 PM: Using /opt/buildhome/.rvm/gems/ruby-2.7.1
9:22:05 PM: Using ruby version 2.7.1
9:22:05 PM: Using PHP version 5.6
9:22:05 PM: Started restoring cached node modules
9:22:05 PM: Finished restoring cached node modules
9:22:05 PM: Installing NPM modules using NPM version 6.14.4
9:22:23 PM: > node-sass@4.14.1 install /opt/build/repo/node_modules/node-sass
9:22:23 PM: > node scripts/install.js
9:22:24 PM: Downloading binary from https://github.com/sass/node-sass/releases/download/v4.14.1/linux-x64-72_binding.node
9:22:24 PM: Download complete
9:22:24 PM: Binary saved to /opt/build/repo/node_modules/node-sass/vendor/linux-x64-72/binding.node
9:22:24 PM: Caching binary to /opt/buildhome/.npm/node-sass/4.14.1/linux-x64-72_binding.node
9:22:24 PM: > phantomjs-prebuilt@2.1.16 install /opt/build/repo/node_modules/phantomjs-prebuilt
9:22:24 PM: > node install.js
9:22:24 PM: PhantomJS not found on PATH
9:22:24 PM: Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
9:22:24 PM: Saving to /opt/buildhome/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
9:22:24 PM: Receiving…
9:22:25 PM: Received 22866K total.
9:22:25 PM: Extracting tar contents (via spawned process)
9:22:28 PM: Removing /opt/build/repo/node_modules/phantomjs-prebuilt/lib/phantom
9:22:28 PM: Copying extracted folder /opt/buildhome/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1630840945439/phantomjs-2.1.1-linux-x86_64 → /opt/build/repo/node_modules/phantomjs-prebuilt/lib/phantom
9:22:29 PM: Writing location.js file
9:22:29 PM: Done. Phantomjs binary available at /opt/build/repo/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
9:22:29 PM: > node-sass@4.14.1 postinstall /opt/build/repo/node_modules/node-sass
9:22:29 PM: > node scripts/build.js
9:22:29 PM: Binary found at /opt/build/repo/node_modules/node-sass/vendor/linux-x64-72/binding.node
9:22:29 PM: Testing binary
9:22:29 PM: Binary is fine
9:22:29 PM: > gifsicle@5.2.0 postinstall /opt/build/repo/node_modules/gifsicle
9:22:29 PM: > node lib/install.js
9:22:30 PM: :heavy_check_mark: gifsicle pre-build test passed successfully
9:22:30 PM: > mozjpeg@6.0.1 postinstall /opt/build/repo/node_modules/mozjpeg
9:22:30 PM: > node lib/install.js
9:22:30 PM: :heavy_check_mark: mozjpeg pre-build test passed successfully
9:22:30 PM: > optipng-bin@6.0.0 postinstall /opt/build/repo/node_modules/optipng-bin
9:22:30 PM: > node lib/install.js
9:22:30 PM: :heavy_check_mark: optipng pre-build test passed successfully
9:22:31 PM: npm WARN French.Plus@1.0.0 license should be a valid SPDX license expression
9:22:31 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/glob-watcher/node_modules/fsevents):
9:22:31 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
9:22:31 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
9:22:31 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
9:22:31 PM: added 936 packages from 521 contributors and audited 1407 packages in 25.406s
9:22:32 PM: 75 packages are looking for funding
9:22:32 PM: run npm fund for details
9:22:32 PM: found 13 vulnerabilities (1 low, 3 moderate, 9 high)
9:22:32 PM: run npm audit fix to fix them, or npm audit for details
9:22:32 PM: NPM modules installed
9:22:33 PM: Started restoring cached go cache
9:22:33 PM: Finished restoring cached go cache
9:22:33 PM: go version go1.14.4 linux/amd64
9:22:33 PM: go version go1.14.4 linux/amd64
9:22:33 PM: Installing missing commands
9:22:33 PM: Verify run directory
9:22:34 PM: ​
9:22:34 PM: ────────────────────────────────────────────────────────────────
9:22:34 PM: Netlify Build
9:22:34 PM: ────────────────────────────────────────────────────────────────
9:22:34 PM: ​
9:22:34 PM: ❯ Version
9:22:34 PM: @netlify/build 18.7.3
9:22:34 PM: ​
9:22:34 PM: ❯ Flags
9:22:34 PM: apiHost: api.netlify.com
9:22:34 PM: baseRelDir: true
9:22:34 PM: branch: prod
9:22:34 PM: buildId: 6134a8288f6fb8000771d13c
9:22:34 PM: buildbotServerSocket: /tmp/netlify-buildbot-socket
9:22:34 PM: cacheDir: /opt/build/cache
9:22:34 PM: cachedConfigPath: /tmp/netlify_config.json
9:22:34 PM: context: production
9:22:34 PM: cwd: /opt/build/repo
9:22:34 PM: deployId: 6134a8288f6fb8000771d13e
9:22:34 PM: featureFlags:
9:22:34 PM: - zisiEsbuildDynamicImports
9:22:34 PM: framework: eleventy
9:22:34 PM: functionsDistDir: /tmp/zisi-6134a8288f6fb8000771d13e
9:22:34 PM: mode: buildbot
9:22:34 PM: nodePath: /opt/buildhome/.nvm/versions/node/v12.18.0/bin/node
9:22:34 PM: repositoryRoot: /opt/build/repo
9:22:34 PM: saveConfig: true
9:22:34 PM: sendStatus: true
9:22:34 PM: siteId: 5ee31735-1a03-4fdc-b840-c4bb4a1e8729
9:22:34 PM: statsd:
9:22:34 PM: host: datadog-agent
9:22:34 PM: port: 8125
9:22:34 PM: testOpts:
9:22:34 PM: silentLingeringProcesses: ‘’
9:22:34 PM: ​
9:22:34 PM: ❯ Current directory
9:22:34 PM: /opt/build/repo
9:22:34 PM: ​
9:22:34 PM: ❯ Config file
9:22:34 PM: /opt/build/repo/netlify.toml
9:22:34 PM: ​
9:22:34 PM: ❯ Resolved config
9:22:34 PM: build:
9:22:34 PM: command: npm run build
9:22:34 PM: commandOrigin: config
9:22:34 PM: environment:
9:22:34 PM: - GOOGLE_PRIVATE_KEY
9:22:34 PM: - GOOGLE_SERVICE_ACCOUNT_EMAIL
9:22:34 PM: - NETLIFY_BUILD_DEBUG
9:22:34 PM: - NODE_ENV
9:22:34 PM: publish: /opt/build/repo/dist
9:22:34 PM: publishOrigin: config
9:22:34 PM: headers:
9:22:34 PM: - for: /
values: Referrer-Policy: no-referrer-when-downgrade X-Content-Type-Options: nosniff X-Frame-Options: DENY X-XSS-Protection: 1; mode=block headersOrigin: config redirects: - force: true from: / status: 302 to: /under-construction/ - force: true from: Under Construction - French Plus status: 302 to: Under Construction - French Plus - from: '’ status: 404 to: /404 redirectsOrigin: config​
9:22:34 PM: ❯ Context
9:22:34 PM: production
9:22:34 PM: ​
9:22:34 PM: ────────────────────────────────────────────────────────────────
9:22:34 PM: 1. build.command from netlify.toml
9:22:34 PM: ────────────────────────────────────────────────────────────────
9:22:34 PM: ​
9:22:34 PM: $ npm run build
9:22:34 PM: > French.Plus@1.0.0 build /opt/build/repo
9:22:34 PM: > npx gulp && concurrently “npx eleventy”
9:22:35 PM: [11:22:35] Using gulpfile /opt/build/repo/gulpfile.js
9:22:35 PM: [11:22:35] Starting ‘default’…
9:22:35 PM: [11:22:35] Starting ‘fonts’…
9:22:35 PM: [11:22:35] Starting ‘images’…
9:22:35 PM: [11:22:35] Starting ‘sass’…
9:22:37 PM: [11:22:37] Finished ‘sass’ after 1.47 s
9:22:37 PM: [11:22:37] Finished ‘fonts’ after 1.98 s
9:23:11 PM: [11:23:11] Finished ‘images’ after 35 s
9:23:11 PM: [11:23:11] Finished ‘default’ after 35 s
9:23:12 PM: [0] ¡Atención!
9:23:12 PM: [0]
9:23:12 PM: [0] This package has nothing to do with the eleventy static site generator.
9:23:12 PM: [0] Most likely, you wanted to install the @11ty/eleventy package instead of this
9:23:12 PM: [0]
9:23:12 PM: [0] ¡Atención!
9:23:12 PM: [0]
9:23:13 PM: [0] command not found: eleventy
9:23:13 PM: [0] npx eleventy exited with code 1
9:23:13 PM: npm ERR! code ELIFECYCLE
9:23:13 PM: npm ERR! errno 1
9:23:13 PM: npm ERR! French.Plus@1.0.0 build: npx gulp && concurrently "npx eleventy"
9:23:13 PM: npm ERR! Exit status 1
9:23:13 PM: npm ERR!
9:23:13 PM: npm ERR! Failed at the French.Plus@1.0.0 build script.
9:23:13 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
9:23:13 PM: npm ERR! A complete log of this run can be found in:
9:23:13 PM: npm ERR! /opt/buildhome/.npm/_logs/2021-09-05T11_23_13_059Z-debug.log
9:23:13 PM: ​
9:23:13 PM: ────────────────────────────────────────────────────────────────
9:23:13 PM: “build.command” failed
9:23:13 PM: ────────────────────────────────────────────────────────────────
9:23:13 PM: ​
9:23:13 PM: Error message
9:23:13 PM: Command failed with exit code 1: npm run build
9:23:13 PM: ​
9:23:13 PM: Error location
9:23:13 PM: In build.command from netlify.toml:
9:23:13 PM: npm run build
9:23:13 PM: ​
9:23:13 PM: Resolved config
9:23:13 PM: build:
9:23:13 PM: command: npm run build
9:23:13 PM: commandOrigin: config
9:23:13 PM: environment:
9:23:13 PM: - GOOGLE_PRIVATE_KEY
9:23:13 PM: - GOOGLE_SERVICE_ACCOUNT_EMAIL
9:23:13 PM: - NETLIFY_BUILD_DEBUG
9:23:13 PM: - NODE_ENV
9:23:13 PM: publish: /opt/build/repo/dist
9:23:13 PM: publishOrigin: config
9:23:13 PM: headers:
9:23:13 PM: - for: /
values: Referrer-Policy: no-referrer-when-downgrade X-Content-Type-Options: nosniff X-Frame-Options: DENY X-XSS-Protection: 1; mode=block headersOrigin: config redirects: - force: true from: / status: 302 to: /under-construction/ - force: true from: Under Construction - French Plus status: 302 to: Under Construction - French Plus - from: ‘*’ status: 404 to: /404 redirectsOrigin: configCaching artifacts
9:23:13 PM: Started saving node modules
9:23:13 PM: Finished saving node modules
9:23:13 PM: Started saving build plugins
9:23:13 PM: Finished saving build plugins
9:23:13 PM: Started saving pip cache
9:23:13 PM: Finished saving pip cache
9:23:13 PM: Started saving emacs cask dependencies
9:23:13 PM: Finished saving emacs cask dependencies
9:23:13 PM: Started saving maven dependencies
9:23:13 PM: Finished saving maven dependencies
9:23:13 PM: Started saving boot dependencies
9:23:13 PM: Finished saving boot dependencies
9:23:13 PM: Started saving rust rustup cache
9:23:13 PM: Finished saving rust rustup cache
9:23:13 PM: Started saving go dependencies
9:23:13 PM: Finished saving go dependencies
9:23:16 PM: Cached ruby version 2.7.1
9:23:16 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
9:23:16 PM: Creating deploy upload records
9:23:16 PM: Failing build: Failed to build site
9:23:16 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
9:23:16 PM: Finished processing build request in 2m2.57232052s

Just to be sure, have you tried installing this package?