I’m stuck so I thought joining this forum may be the answer.
After setting Node and Jekyll to production in the netlify.toml file at root in order for unused CSS to be purged, I am getting the following:
4:16:29 PM: Build ready to start
4:16:31 PM: build-image version: d03efc9bc7b65d83035572f6dba444f85407dd60
4:16:31 PM: build-image tag: v3.7.5
4:16:31 PM: buildbot version: 6dd06f64b3b0b51f07678bbd16c7e5a748905aed
4:16:31 PM: Building without cache
4:16:31 PM: Starting to prepare the repo for build
4:16:32 PM: No cached dependencies found. Cloning fresh repo
4:16:32 PM: git clone git@github.com:lwalding/jekyll-site
4:16:33 PM: Preparing Git Reference pull/6/head
4:16:33 PM: Parsing package.json dependencies
4:16:34 PM: Starting build script
4:16:35 PM: Installing dependencies
4:16:35 PM: Python version set to 2.7
4:16:36 PM: Downloading and installing node v16.0.0…
4:16:36 PM: Downloading https://nodejs.org/dist/v16.0.0/node-v16.0.0-linux-x64.tar.xz…
4:16:36 PM: Computing checksum with sha256sum
4:16:36 PM: Checksums matched!
4:16:39 PM: Now using node v16.0.0 (npm v7.10.0)
4:16:40 PM: Started restoring cached build plugins
4:16:40 PM: Finished restoring cached build plugins
4:16:40 PM: Attempting ruby version 3.0.1, read from environment
4:16:40 PM:
4:16:40 PM: ** WARNING **
4:16:40 PM: Using custom ruby version 3.0.1, this will slow down the build.
4:16:40 PM: To ensure fast builds, set the RUBY_VERSION environment variable, or .ruby-version file, to an included ruby version.
4:16:40 PM: Included versions: 2.7.1 2.6.2
4:16:40 PM:
4:16:41 PM: Required ruby-3.0.1 is not installed - installing.
4:16:41 PM: Searching for binary rubies, this might take some time.
4:16:43 PM: Found remote file https://rubies.travis-ci.org/ubuntu/16.04/x86_64/ruby-3.0.1.tar.bz2
4:16:43 PM: Checking requirements for ubuntu.
4:16:44 PM: Requirements installation successful.
4:16:44 PM: ruby-3.0.1 - #configure
4:16:44 PM: ruby-3.0.1 - #download
4:16:46 PM: No checksum for downloaded archive, recording checksum in user configuration.
4:16:46 PM: ruby-3.0.1 - #validate archive
4:16:52 PM: ruby-3.0.1 - #extract
4:16:55 PM: ruby-3.0.1 - #validate binary
4:16:56 PM: ruby-3.0.1 - #setup
4:16:56 PM: ruby-3.0.1 - #gemset created /opt/buildhome/.rvm/gems/ruby-3.0.1@global
4:16:56 PM: ruby-3.0.1 - #importing gemset /opt/buildhome/.rvm/gemsets/global.gems…
4:16:57 PM: ruby-3.0.1 - #generating global wrappers…
4:16:57 PM: ruby-3.0.1 - #gemset created /opt/buildhome/.rvm/gems/ruby-3.0.1
4:16:57 PM: ruby-3.0.1 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list
4:16:58 PM: ruby-3.0.1 - #generating default wrappers…
4:16:58 PM: Using /opt/buildhome/.rvm/gems/ruby-3.0.1
4:16:59 PM: Using ruby version 3.0.1
4:16:59 PM: Using bundler version 2.2.15 from Gemfile.lock
4:16:59 PM: Using PHP version 5.6
4:16:59 PM: Started restoring cached ruby gems
4:16:59 PM: Finished restoring cached ruby gems
4:16:59 PM: Installing gem bundle
4:16:59 PM: [DEPRECATED] The --path
flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use bundle config set --local path '/opt/build/cache/bundle'
, and stop using this flag
4:16:59 PM: [DEPRECATED] The --binstubs option will be removed in favor of bundle binstubs --all
4:17:02 PM: Fetching gem metadata from https://rubygems.org/…
4:17:02 PM: Resolving dependencies…
4:17:02 PM: Using bundler 2.2.15
4:17:02 PM: Fetching colorator 1.1.0
4:17:02 PM: Fetching concurrent-ruby 1.1.8
4:17:02 PM: Fetching eventmachine 1.2.7
4:17:02 PM: Fetching http_parser.rb 0.6.0
4:17:02 PM: Fetching public_suffix 4.0.6
4:17:02 PM: Fetching forwardable-extended 2.6.0
4:17:02 PM: Fetching ffi 1.15.0
4:17:02 PM: Fetching rb-fsevent 0.10.4
4:17:02 PM: Installing forwardable-extended 2.6.0
4:17:02 PM: Installing colorator 1.1.0
4:17:02 PM: Installing rb-fsevent 0.10.4
4:17:02 PM: Installing http_parser.rb 0.6.0 with native extensions
4:17:02 PM: Installing public_suffix 4.0.6
4:17:02 PM: Installing eventmachine 1.2.7 with native extensions
4:17:02 PM: Fetching rexml 3.2.5
4:17:02 PM: Installing concurrent-ruby 1.1.8
4:17:02 PM: Fetching liquid 4.0.3
4:17:02 PM: Fetching mercenary 0.4.0
4:17:02 PM: Installing rexml 3.2.5
4:17:02 PM: Installing liquid 4.0.3
4:17:02 PM: Installing mercenary 0.4.0
4:17:03 PM: Fetching rouge 3.26.0
4:17:03 PM: Installing ffi 1.15.0 with native extensions
4:17:03 PM: Fetching safe_yaml 1.0.5
4:17:03 PM: Installing safe_yaml 1.0.5
4:17:03 PM: Installing rouge 3.26.0
4:17:03 PM: Fetching unicode-display_width 1.7.0
4:17:03 PM: Installing unicode-display_width 1.7.0
4:17:03 PM: Fetching jekyll-postcss 0.4.0
4:17:03 PM: Fetching jekyll-purgecss 0.3.0
4:17:03 PM: Installing jekyll-postcss 0.4.0
4:17:03 PM: Fetching webrick 1.7.0
4:17:04 PM: Installing jekyll-purgecss 0.3.0
4:17:04 PM: Installing webrick 1.7.0
4:17:04 PM: Fetching pathutil 0.16.2
4:17:04 PM: Fetching addressable 2.7.0
4:17:04 PM: Fetching kramdown 2.3.1
4:17:04 PM: Installing pathutil 0.16.2
4:17:04 PM: Fetching terminal-table 2.0.0
4:17:04 PM: Installing addressable 2.7.0
4:17:04 PM: Installing kramdown 2.3.1
4:17:04 PM: Installing terminal-table 2.0.0
4:17:04 PM: Fetching i18n 1.8.10
4:17:04 PM: Installing i18n 1.8.10
4:17:07 PM: Fetching kramdown-parser-gfm 1.1.0
4:17:07 PM: Installing kramdown-parser-gfm 1.1.0
4:17:16 PM: Fetching rb-inotify 0.10.1
4:17:16 PM: Fetching sassc 2.4.0
4:17:16 PM: Installing rb-inotify 0.10.1
4:17:16 PM: Fetching listen 3.5.1
4:17:16 PM: Installing sassc 2.4.0 with native extensions
4:17:17 PM: Installing listen 3.5.1
4:17:17 PM: Fetching jekyll-watch 2.2.1
4:17:17 PM: Installing jekyll-watch 2.2.1
4:17:18 PM: Fetching em-websocket 0.5.2
4:17:18 PM: Installing em-websocket 0.5.2
4:18:48 PM: Fetching jekyll-sass-converter 2.1.0
4:18:48 PM: Installing jekyll-sass-converter 2.1.0
4:18:48 PM: Fetching jekyll 4.2.0
4:18:48 PM: Installing jekyll 4.2.0
4:18:48 PM: Fetching jekyll-seo-tag 2.7.1
4:18:48 PM: Installing jekyll-seo-tag 2.7.1
4:18:48 PM: Bundle complete! 5 Gemfile dependencies, 32 gems now installed.
4:18:48 PM: Bundled gems are installed into /opt/build/cache/bundle
4:18:48 PM: Gem bundle installed
4:18:48 PM: Started restoring cached node modules
4:18:48 PM: Finished restoring cached node modules
4:18:48 PM: Installing NPM modules using NPM version 7.10.0
4:18:54 PM: added 222 packages, and audited 223 packages in 6s
4:18:54 PM: 27 packages are looking for funding
4:18:54 PM: run npm fund
for details
4:18:54 PM: found 0 vulnerabilities
4:18:54 PM: NPM modules installed
4:18:55 PM: Started restoring cached go cache
4:18:55 PM: Finished restoring cached go cache
4:18:55 PM: go version go1.14.4 linux/amd64
4:18:55 PM: go version go1.14.4 linux/amd64
4:18:55 PM: Installing missing commands
4:18:55 PM: Verify run directory
4:18:57 PM:
4:18:57 PM: ────────────────────────────────────────────────────────────────
4:18:57 PM: Netlify Build
4:18:57 PM: ────────────────────────────────────────────────────────────────
4:18:57 PM:
4:18:57 PM: ❯ Version
4:18:57 PM: @netlify/build 11.10.0
4:18:57 PM:
4:18:57 PM: ❯ Flags
4:18:57 PM: deployId: 60977e3d6d24e8e8a57a8252
4:18:57 PM:
4:18:57 PM: ❯ Current directory
4:18:57 PM: /opt/build/repo
4:18:57 PM:
4:18:57 PM: ❯ Config file
4:18:57 PM: /opt/build/repo/netlify.toml
4:18:57 PM:
4:18:57 PM: ❯ Context
4:18:57 PM: deploy-preview
4:18:57 PM:
4:18:57 PM: ❯ Installing plugins
4:18:57 PM: - @netlify/plugin-lighthouse@2.1.0
4:18:57 PM: - @netlify/plugin-sitemap@0.8.1
4:19:16 PM:
4:19:16 PM: ❯ Loading plugins
4:19:16 PM: - @netlify/plugin-lighthouse@2.1.0 from Netlify app
4:19:16 PM: - @netlify/plugin-sitemap@0.8.1 from Netlify app
4:19:17 PM:
4:19:17 PM: ────────────────────────────────────────────────────────────────
4:19:17 PM: 1. Build command from Netlify app
4:19:17 PM: ────────────────────────────────────────────────────────────────
4:19:17 PM:
4:19:17 PM: $ bundle exec jekyll build --trace
4:19:18 PM: Configuration file: /opt/build/repo/_config.yml
4:19:18 PM: Source: /opt/build/repo
4:19:18 PM: Destination: /opt/build/repo/_site
4:19:18 PM: Incremental build: disabled. Enable with --incremental
4:19:18 PM: Generating…
4:19:19 PM: /opt/build/repo/node_modules/acorn/dist/acorn.js:2929
4:19:19 PM: throw err
4:19:19 PM: ^
4:19:19 PM: SyntaxError: Unexpected token (3:11)
4:19:19 PM: at _class.pp$4.raise (/opt/build/repo/node_modules/acorn/dist/acorn.js:2927:15)
4:19:19 PM: at _class.pp.unexpected (/opt/build/repo/node_modules/acorn/dist/acorn.js:698:10)
4:19:19 PM: at _class.pp.expect (/opt/build/repo/node_modules/acorn/dist/acorn.js:692:28)
4:19:19 PM: at _class.pp$3.parseExprList (/opt/build/repo/node_modules/acorn/dist/acorn.js:2818:14)
4:19:19 PM: at _class.pp$3.parseExprAtom (/opt/build/repo/node_modules/acorn/dist/acorn.js:2298:28)
4:19:19 PM: at _class.parseExprAtom (/opt/build/repo/node_modules/acorn-node/lib/dynamic-import/index.js:77:117)
4:19:19 PM: at _class.pp$3.parseExprSubscripts (/opt/build/repo/node_modules/acorn/dist/acorn.js:2129:21)
4:19:19 PM: at _class.pp$3.parseMaybeUnary (/opt/build/repo/node_modules/acorn/dist/acorn.js:2106:19)
4:19:19 PM: at _class.parseMaybeUnary (/opt/build/repo/node_modules/acorn-node/lib/private-class-elements/index.js:122:54)
4:19:19 PM: at _class.pp$3.parseExprOps (/opt/build/repo/node_modules/acorn/dist/acorn.js:2041:21) {
4:19:19 PM: pos: 41,
4:19:19 PM: loc: Position { line: 3, column: 11 },
4:19:19 PM: raisedAt: 42
4:19:19 PM: }
4:19:19 PM: Conversion error: Jekyll::Converters::PostCss encountered an error while converting ‘css/main.scss’:
4:19:19 PM: 809: unexpected token at ‘’
4:19:19 PM: /opt/buildhome/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/json/common.rb:216:in parse': 809: unexpected token at '' (JSON::ParserError) from /opt/buildhome/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/json/common.rb:216:in
parse’ from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-postcss-0.4.0/lib/jekyll-postcss/socket.rb:43:in decode' from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-postcss-0.4.0/lib/jekyll-postcss/socket.rb:32:in
read’ from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-postcss-0.4.0/lib/jekyll/converters/postcss.rb:41:in convert' from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/renderer.rb:106:in
block in convert’ from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/renderer.rb:104:in each' from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/renderer.rb:104:in
reduce’ from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/renderer.rb:104:in convert' from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/renderer.rb:84:in
render_document’ from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/renderer.rb:63:in run' from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:547:in
render_regenerated’ from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:539:in block in render_pages' from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:538:in
each’ from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:538:in render_pages' from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:211:in
render’ from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:80:in process' from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:28:in
process_site’ from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:65:in build' from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:36:in
process’ from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in block in process_with_graceful_fail' from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in
each’ from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in process_with_graceful_fail' from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:18:in
block (2 levels) in init_with_program’ from /opt/build/cache/bundle/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in block in execute' from /opt/build/cache/bundle/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in
each’ from /opt/build/cache/bundle/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in execute' from /opt/build/cache/bundle/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in
go’ from /opt/build/cache/bundle/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in program' from /opt/build/cache/bundle/ruby/3.0.0/gems/jekyll-4.2.0/exe/jekyll:15:in
<top (required)>’ from /opt/build/cache/bundle/ruby/3.0.0/bin/jekyll:23:in load' from /opt/build/cache/bundle/ruby/3.0.0/bin/jekyll:23:in
’ from /opt/buildhome/.rvm/rubies/ruby-3.0.1/bin/ruby_executable_hooks:22:in eval' from /opt/buildhome/.rvm/rubies/ruby-3.0.1/bin/ruby_executable_hooks:22:in
'
4:19:19 PM: ────────────────────────────────────────────────────────────────
4:19:19 PM: “build.command” failed
4:19:19 PM: ────────────────────────────────────────────────────────────────
4:19:19 PM:
4:19:19 PM: Error message
4:19:19 PM: Command failed with exit code 1: bundle exec jekyll build --trace
4:19:19 PM:
4:19:19 PM: Error location
4:19:19 PM: In Build command from Netlify app:
4:19:19 PM: bundle exec jekyll build --trace
4:19:19 PM:
4:19:19 PM: Resolved config
4:19:19 PM: build:
4:19:19 PM: command: bundle exec jekyll build --trace
4:19:19 PM: commandOrigin: ui
4:19:19 PM: environment:
4:19:19 PM: - REVIEW_ID
4:19:19 PM: - RUBY_VERSION
4:19:19 PM: - NODE_ENV
4:19:19 PM: - NODE_VERSION
4:19:19 PM: - JEKYLL_ENV
4:19:19 PM: publish: /opt/build/repo/_site
4:19:19 PM: plugins:
4:19:19 PM: - inputs: {}
4:19:19 PM: origin: ui
4:19:19 PM: package: ‘@netlify/plugin-lighthouse’
4:19:19 PM: - inputs: {}
4:19:19 PM: origin: ui
4:19:19 PM: package: ‘@netlify/plugin-sitemap’
4:19:19 PM: Caching artifacts
4:19:19 PM: Started saving ruby gems
4:19:19 PM: Finished saving ruby gems
4:19:19 PM: Started saving node modules
4:19:19 PM: Finished saving node modules
4:19:19 PM: Started saving build plugins
4:19:19 PM: Finished saving build plugins
4:19:19 PM: Started saving pip cache
4:19:19 PM: Finished saving pip cache
4:19:19 PM: Started saving emacs cask dependencies
4:19:20 PM: Finished saving emacs cask dependencies
4:19:20 PM: Started saving maven dependencies
4:19:20 PM: Finished saving maven dependencies
4:19:20 PM: Started saving boot dependencies
4:19:20 PM: Finished saving boot dependencies
4:19:20 PM: Started saving rust rustup cache
4:19:20 PM: Finished saving rust rustup cache
4:19:20 PM: Started saving go dependencies
4:19:20 PM: Finished saving go dependencies
4:19:23 PM: Cached ruby version 3.0.1
4:19:23 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
4:19:23 PM: Creating deploy upload records
4:19:23 PM: Failing build: Failed to build site
4:19:23 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
4:19:23 PM: Finished processing build request in 2m51.924563943s
The main.scss file that is being referred to in the error only contains the following:
@import “tailwindcss/base”;
@import “tailwindcss/components”;
@import “tailwindcss/utilities”;
The build is successful without setting NODE_ENV to production but then I’m stuck with all of Tailwind coming in at approximately 3MB.
Thanks to any responders in advance, this is driving me crazy.
Preview URL: https://deploy-preview-6--infallible-morse-02eca7.netlify.app (when build succeeds…)
Deployment URL: Netlify App