GitHub Repo: GitHub - TylerMRoderick/fernfolio-11ty-template: The super simple portfolio template built with Eleventy and Netlify CMS
Netlify site name: benrmatthews.netlify.app
Describe the bug
Using Fernfolio — An 11ty Portfolio Template. Site deploys to Netlify when using the button on the GitHub repo. However, If the home page image is changed (or any image), then the Netlify build fails. The build fails even if you switch back to the original image.
To Reproduce
Steps to reproduce the behavior:
- Deploy to Netlify
- Login to Netlify CMS
- Navigate to Pages > Home
- Edit the home page image
- Upload a new image
- Save changes to trigger a Netlify build
- Build fails
Expected behavior
Expect the image to change and the build to pass
4:27:47 AM: Build ready to start
4:28:12 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
4:27:49 AM: build-image version: c11c0eb9939c949586b0f78302107908b668a11e (focal)
4:27:49 AM: buildbot version: c11c0eb9939c949586b0f78302107908b668a11e
4:27:49 AM: Fetching cached dependencies
4:27:49 AM: Starting to download cache of 273.1MB
4:27:53 AM: Finished downloading cache in 3.97s
4:27:53 AM: Starting to extract cache
4:27:55 AM: Finished extracting cache in 2.042s
4:27:55 AM: Finished fetching cache in 6.103s
4:27:55 AM: Starting to prepare the repo for build
4:27:55 AM: Preparing Git Reference refs/heads/master
4:27:57 AM: Starting to install dependencies
4:27:57 AM: Python version set to 3.8
4:27:57 AM: Attempting Ruby version 2.7.2, read from environment
4:27:58 AM: Using Ruby version 2.7.2
4:27:58 AM: Started restoring cached go cache
4:27:58 AM: Finished restoring cached go cache
4:27:58 AM: go version go1.19.10 linux/amd64
4:27:59 AM: Using PHP version 8.0
4:28:00 AM: Started restoring cached Node.js version
4:28:00 AM: Finished restoring cached Node.js version
4:28:00 AM: Attempting Node.js version ‘16’ from .nvmrc
4:28:01 AM: v16.20.0 is already installed.
4:28:01 AM: Now using node v16.20.0 (npm v8.19.4)
4:28:01 AM: Enabling Node.js Corepack
4:28:01 AM: Started restoring cached build plugins
4:28:01 AM: Finished restoring cached build plugins
4:28:01 AM: Started restoring cached corepack dependencies
4:28:01 AM: Finished restoring cached corepack dependencies
4:28:01 AM: No npm workspaces detected
4:28:01 AM: Started restoring cached node modules
4:28:01 AM: Finished restoring cached node modules
4:28:01 AM: Installing npm packages using npm version 8.19.4
4:28:04 AM: up to date, audited 592 packages in 3s
4:28:04 AM: 105 packages are looking for funding
4:28:04 AM: run npm fund
for details
4:28:04 AM: 5 vulnerabilities (2 moderate, 1 high, 2 critical)
4:28:04 AM: To address all issues (including breaking changes), run:
4:28:04 AM: npm audit fix --force
4:28:04 AM: Run npm audit
for details.
4:28:04 AM: npm packages installed
4:28:05 AM: Install dependencies script success
4:28:05 AM: Starting build script
4:28:06 AM: Detected 1 framework(s)
4:28:06 AM: eleventy at version 0.11.1
4:28:06 AM: Section completed: initializing
4:28:07 AM:
4:28:07 AM: Netlify Build
4:28:07 AM: ────────────────────────────────────────────────────────────────
4:28:07 AM:
4:28:07 AM: ❯ Version
4:28:07 AM: @netlify/build 29.12.1
4:28:07 AM:
4:28:07 AM: ❯ Flags
4:28:07 AM: baseRelDir: true
4:28:07 AM: buildId: 648bd6b276cc9c00088daf86
4:28:07 AM: deployId: 648bd6b276cc9c00088daf88
4:28:07 AM:
4:28:07 AM: ❯ Current directory
4:28:07 AM: /opt/build/repo
4:28:07 AM:
4:28:07 AM: ❯ Config file
4:28:07 AM: /opt/build/repo/netlify.toml
4:28:07 AM:
4:28:07 AM: ❯ Context
4:28:07 AM: production
4:28:07 AM:
4:28:07 AM: ❯ Loading plugins
4:28:07 AM: - @netlify/plugin-lighthouse@4.1.1 from Netlify app
4:28:07 AM: - @netlify/plugin-sitemap@0.8.1 from Netlify app
4:28:09 AM:
4:28:09 AM: build.command from netlify.toml
4:28:09 AM: ────────────────────────────────────────────────────────────────
4:28:09 AM:
4:28:09 AM: $ npm run build
4:28:09 AM: > fernfolio-11ty-template@1.0.0 build
4:28:09 AM: > cross-env npm-run-all build:sass build:scripts build:eleventy
4:28:10 AM: > fernfolio-11ty-template@1.0.0 build:sass
4:28:10 AM: > sass --no-source-map src/assets/scss/main.scss _site/assets/css/main.css
4:28:10 AM: > fernfolio-11ty-template@1.0.0 build:scripts
4:28:10 AM: > esbuild ./src/assets/js/main.js --target=es6 --bundle --minify --outfile=./_site/assets/js/main.bundle.js
4:28:10 AM: _site/assets/js/main.bundle.js 39.8kb
4:28:10 AM: Done in 8ms
4:28:10 AM: > fernfolio-11ty-template@1.0.0 build:eleventy
4:28:10 AM: > eleventy
4:28:11 AM: Problem writing Eleventy templates: (more in DEBUG output)
4:28:11 AM: > Having trouble rendering njk template ./src/index.njk
4:28:11 AM: TemplateContentRenderError
was thrown
4:28:11 AM: > (./src/index.njk)
4:28:11 AM: EleventyShortcodeError: Error with Nunjucks shortcode image
4:28:11 AM: Template render error
was thrown
4:28:11 AM: > ENOENT: no such file or directory, stat ‘/src/assets/img/fern-forest.jpeg’
4:28:11 AM: Template render error
was thrown:
4:28:11 AM: Error: ENOENT: no such file or directory, stat ‘/src/assets/img/fern-forest.jpeg’
4:28:11 AM: at Object.statSync (node:fs:1583:3)
4:28:11 AM: at Image.getInMemoryCacheKey (/opt/build/repo/node_modules/@11ty/eleventy-img/img.js:156:32)
4:28:11 AM: at queueImage (/opt/build/repo/node_modules/@11ty/eleventy-img/img.js:614:15)
4:28:11 AM: at Object.imageShortcode (/opt/build/repo/src/_11ty/shortcodes/image-shortcode.js:4:24)
4:28:11 AM: at Object. (/opt/build/repo/node_modules/@11ty/eleventy/src/BenchmarkGroup.js:30:26)
4:28:11 AM: at ShortcodeFunction.run (/opt/build/repo/node_modules/@11ty/eleventy/src/Engines/Nunjucks.js:120:14)
4:28:11 AM: at Template.root [as rootRenderFunc] (eval at _compile (/opt/build/repo/node_modules/nunjucks/src/environment.js:527:18), :20:33)
4:28:11 AM: at Template.render (/opt/build/repo/node_modules/nunjucks/src/environment.js:454:10)
4:28:11 AM: at /opt/build/repo/node_modules/@11ty/eleventy/src/Engines/Nunjucks.js:236:14
4:28:11 AM: at new Promise ()
4:28:11 AM: Copied 18 files / Wrote 0 files in 0.26 seconds (v0.11.1)
4:28:11 AM: ERROR: build:eleventy exited with 1.
4:28:11 AM:
4:28:11 AM: build.command failed
4:28:11 AM: ────────────────────────────────────────────────────────────────
4:28:11 AM:
4:28:11 AM: Error message
4:28:11 AM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
4:28:11 AM:
4:28:11 AM: Error location
4:28:11 AM: In build.command from netlify.toml:
4:28:11 AM: npm run build
4:28:11 AM:
4:28:11 AM: Resolved config
4:28:11 AM: build:
4:28:11 AM: command: npm run build
4:28:11 AM: commandOrigin: config
4:28:11 AM: publish: /opt/build/repo/_site
4:28:11 AM: publishOrigin: config
4:28:11 AM: plugins:
4:28:11 AM: - inputs: {}
4:28:11 AM: origin: ui
4:28:11 AM: package: ‘@netlify/plugin-lighthouse’
4:28:11 AM: - inputs: {}
4:28:11 AM: origin: ui
4:28:11 AM: package: ‘@netlify/plugin-sitemap’
4:28:12 AM: Caching artifacts
4:28:12 AM: Started saving node modules
4:28:12 AM: Finished saving node modules
4:28:12 AM: Started saving build plugins
4:28:12 AM: Finished saving build plugins
4:28:12 AM: Started saving corepack cache
4:28:12 AM: Finished saving corepack cache
4:28:12 AM: Started saving pip cache
4:28:12 AM: Finished saving pip cache
4:28:12 AM: Started saving emacs cask dependencies
4:28:12 AM: Finished saving emacs cask dependencies
4:28:12 AM: Started saving maven dependencies
4:28:12 AM: Finished saving maven dependencies
4:28:12 AM: Started saving boot dependencies
4:28:12 AM: Finished saving boot dependencies
4:28:12 AM: Started saving rust rustup cache
4:28:12 AM: Finished saving rust rustup cache
4:28:12 AM: Started saving go dependencies
4:28:12 AM: Finished saving go dependencies
4:28:12 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
4:28:12 AM: Failing build: Failed to build site
4:28:12 AM: Finished processing build request in 23.858s
Deploy log from Netlify
4:27:47 AM: Build ready to start
4:28:12 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
4:27:49 AM: build-image version: c11c0eb9939c949586b0f78302107908b668a11e (focal)
4:27:49 AM: buildbot version: c11c0eb9939c949586b0f78302107908b668a11e
4:27:49 AM: Fetching cached dependencies
4:27:49 AM: Starting to download cache of 273.1MB
4:27:53 AM: Finished downloading cache in 3.97s
4:27:53 AM: Starting to extract cache
4:27:55 AM: Finished extracting cache in 2.042s
4:27:55 AM: Finished fetching cache in 6.103s
4:27:55 AM: Starting to prepare the repo for build
4:27:55 AM: Preparing Git Reference refs/heads/master
4:27:57 AM: Starting to install dependencies
4:27:57 AM: Python version set to 3.8
4:27:57 AM: Attempting Ruby version 2.7.2, read from environment
4:27:58 AM: Using Ruby version 2.7.2
4:27:58 AM: Started restoring cached go cache
4:27:58 AM: Finished restoring cached go cache
4:27:58 AM: go version go1.19.10 linux/amd64
4:27:59 AM: Using PHP version 8.0
4:28:00 AM: Started restoring cached Node.js version
4:28:00 AM: Finished restoring cached Node.js version
4:28:00 AM: Attempting Node.js version ‘16’ from .nvmrc
4:28:01 AM: v16.20.0 is already installed.
4:28:01 AM: Now using node v16.20.0 (npm v8.19.4)
4:28:01 AM: Enabling Node.js Corepack
4:28:01 AM: Started restoring cached build plugins
4:28:01 AM: Finished restoring cached build plugins
4:28:01 AM: Started restoring cached corepack dependencies
4:28:01 AM: Finished restoring cached corepack dependencies
4:28:01 AM: No npm workspaces detected
4:28:01 AM: Started restoring cached node modules
4:28:01 AM: Finished restoring cached node modules
4:28:01 AM: Installing npm packages using npm version 8.19.4
4:28:04 AM: up to date, audited 592 packages in 3s
4:28:04 AM: 105 packages are looking for funding
4:28:04 AM: run npm fund
for details
4:28:04 AM: 5 vulnerabilities (2 moderate, 1 high, 2 critical)
4:28:04 AM: To address all issues (including breaking changes), run:
4:28:04 AM: npm audit fix --force
4:28:04 AM: Run npm audit
for details.
4:28:04 AM: npm packages installed
4:28:05 AM: Install dependencies script success
4:28:05 AM: Starting build script
4:28:06 AM: Detected 1 framework(s)
4:28:06 AM: eleventy at version 0.11.1
4:28:06 AM: Section completed: initializing
4:28:07 AM:
4:28:07 AM: Netlify Build
4:28:07 AM: ────────────────────────────────────────────────────────────────
4:28:07 AM:
4:28:07 AM: ❯ Version
4:28:07 AM: @netlify/build 29.12.1
4:28:07 AM:
4:28:07 AM: ❯ Flags
4:28:07 AM: baseRelDir: true
4:28:07 AM: buildId: 648bd6b276cc9c00088daf86
4:28:07 AM: deployId: 648bd6b276cc9c00088daf88
4:28:07 AM:
4:28:07 AM: ❯ Current directory
4:28:07 AM: /opt/build/repo
4:28:07 AM:
4:28:07 AM: ❯ Config file
4:28:07 AM: /opt/build/repo/netlify.toml
4:28:07 AM:
4:28:07 AM: ❯ Context
4:28:07 AM: production
4:28:07 AM:
4:28:07 AM: ❯ Loading plugins
4:28:07 AM: - @netlify/plugin-lighthouse@4.1.1 from Netlify app
4:28:07 AM: - @netlify/plugin-sitemap@0.8.1 from Netlify app
4:28:09 AM:
4:28:09 AM: build.command from netlify.toml
4:28:09 AM: ────────────────────────────────────────────────────────────────
4:28:09 AM:
4:28:09 AM: $ npm run build
4:28:09 AM: > fernfolio-11ty-template@1.0.0 build
4:28:09 AM: > cross-env npm-run-all build:sass build:scripts build:eleventy
4:28:10 AM: > fernfolio-11ty-template@1.0.0 build:sass
4:28:10 AM: > sass --no-source-map src/assets/scss/main.scss _site/assets/css/main.css
4:28:10 AM: > fernfolio-11ty-template@1.0.0 build:scripts
4:28:10 AM: > esbuild ./src/assets/js/main.js --target=es6 --bundle --minify --outfile=./_site/assets/js/main.bundle.js
4:28:10 AM: _site/assets/js/main.bundle.js 39.8kb
4:28:10 AM: Done in 8ms
4:28:10 AM: > fernfolio-11ty-template@1.0.0 build:eleventy
4:28:10 AM: > eleventy
4:28:11 AM: Problem writing Eleventy templates: (more in DEBUG output)
4:28:11 AM: > Having trouble rendering njk template ./src/index.njk
4:28:11 AM: TemplateContentRenderError
was thrown
4:28:11 AM: > (./src/index.njk)
4:28:11 AM: EleventyShortcodeError: Error with Nunjucks shortcode image
4:28:11 AM: Template render error
was thrown
4:28:11 AM: > ENOENT: no such file or directory, stat ‘/src/assets/img/fern-forest.jpeg’
4:28:11 AM: Template render error
was thrown:
4:28:11 AM: Error: ENOENT: no such file or directory, stat ‘/src/assets/img/fern-forest.jpeg’
4:28:11 AM: at Object.statSync (node:fs:1583:3)
4:28:11 AM: at Image.getInMemoryCacheKey (/opt/build/repo/node_modules/@11ty/eleventy-img/img.js:156:32)
4:28:11 AM: at queueImage (/opt/build/repo/node_modules/@11ty/eleventy-img/img.js:614:15)
4:28:11 AM: at Object.imageShortcode (/opt/build/repo/src/_11ty/shortcodes/image-shortcode.js:4:24)
4:28:11 AM: at Object. (/opt/build/repo/node_modules/@11ty/eleventy/src/BenchmarkGroup.js:30:26)
4:28:11 AM: at ShortcodeFunction.run (/opt/build/repo/node_modules/@11ty/eleventy/src/Engines/Nunjucks.js:120:14)
4:28:11 AM: at Template.root [as rootRenderFunc] (eval at _compile (/opt/build/repo/node_modules/nunjucks/src/environment.js:527:18), :20:33)
4:28:11 AM: at Template.render (/opt/build/repo/node_modules/nunjucks/src/environment.js:454:10)
4:28:11 AM: at /opt/build/repo/node_modules/@11ty/eleventy/src/Engines/Nunjucks.js:236:14
4:28:11 AM: at new Promise ()
4:28:11 AM: Copied 18 files / Wrote 0 files in 0.26 seconds (v0.11.1)
4:28:11 AM: ERROR: build:eleventy exited with 1.
4:28:11 AM:
4:28:11 AM: build.command failed
4:28:11 AM: ────────────────────────────────────────────────────────────────
4:28:11 AM:
4:28:11 AM: Error message
4:28:11 AM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
4:28:11 AM:
4:28:11 AM: Error location
4:28:11 AM: In build.command from netlify.toml:
4:28:11 AM: npm run build
4:28:11 AM:
4:28:11 AM: Resolved config
4:28:11 AM: build:
4:28:11 AM: command: npm run build
4:28:11 AM: commandOrigin: config
4:28:11 AM: publish: /opt/build/repo/_site
4:28:11 AM: publishOrigin: config
4:28:11 AM: plugins:
4:28:11 AM: - inputs: {}
4:28:11 AM: origin: ui
4:28:11 AM: package: ‘@netlify/plugin-lighthouse’
4:28:11 AM: - inputs: {}
4:28:11 AM: origin: ui
4:28:11 AM: package: ‘@netlify/plugin-sitemap’
4:28:12 AM: Caching artifacts
4:28:12 AM: Started saving node modules
4:28:12 AM: Finished saving node modules
4:28:12 AM: Started saving build plugins
4:28:12 AM: Finished saving build plugins
4:28:12 AM: Started saving corepack cache
4:28:12 AM: Finished saving corepack cache
4:28:12 AM: Started saving pip cache
4:28:12 AM: Finished saving pip cache
4:28:12 AM: Started saving emacs cask dependencies
4:28:12 AM: Finished saving emacs cask dependencies
4:28:12 AM: Started saving maven dependencies
4:28:12 AM: Finished saving maven dependencies
4:28:12 AM: Started saving boot dependencies
4:28:12 AM: Finished saving boot dependencies
4:28:12 AM: Started saving rust rustup cache
4:28:12 AM: Finished saving rust rustup cache
4:28:12 AM: Started saving go dependencies
4:28:12 AM: Finished saving go dependencies
4:28:12 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
4:28:12 AM: Failing build: Failed to build site
4:28:12 AM: Finished processing build request in 23.858s