genicsblog / theme-files

Theme files for genicsblog.com
https://staging.genicsblog.com
Other
8 stars 11 forks source link

How to fix the Netlify error #81

Closed Nexus-Gits closed 1 year ago

Nexus-Gits commented 1 year ago

Netlify show the error " Jekyll 4.2.2 Please append --trace to the build command for any additional information or backtrace. " not build the site with netlify. please help me to fix the issue.

6:02:23 PM: $ jekyll build 6:02:24 PM: Configuration file: /opt/build/repo/_config.yml 6:02:36 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2) 6:02:34 PM: ------------------------------------------------ 6:02:34 PM: Jekyll 4.2.2 Please append --trace to the build command 6:02:34 PM: for any additional information or backtrace. 6:02:34 PM: ------------------------------------------------ 6:02:34 PM: /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-postcss-0.5.0/lib/jekyll-postcss/socket.rb:70:in rescue in start_dev_server': Could not connect to the PostCSS server (RuntimeError) 6:02:34 PM: from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-postcss-0.5.0/lib/jekyll-postcss/socket.rb:61:instart_dev_server' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-postcss-0.5.0/lib/jekyll-postcss/socket.rb:13:in initialize' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-postcss-0.5.0/lib/jekyll/converters/postcss.rb:16:innew' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-postcss-0.5.0/lib/jekyll/converters/postcss.rb:16:in block in initialize' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-postcss-0.5.0/lib/jekyll/converters/postcss.rb:16:infetch' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-postcss-0.5.0/lib/jekyll/converters/postcss.rb:16:in initialize' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:321:innew' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:321:in block (2 levels) in instantiate_subclasses' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:321:inmap!' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:321:in block in instantiate_subclasses' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:319:intap' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:319:in instantiate_subclasses' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:133:insetup' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:36:in initialize' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:30:innew' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:30:in process' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:inblock in process_with_graceful_fail' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in each' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:inprocess_with_graceful_fail' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:18:in block (2 levels) in init_with_program' from /opt/build/cache/bundle/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:inblock in execute' from /opt/build/cache/bundle/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in each' from /opt/build/cache/bundle/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:inexecute' from /opt/build/cache/bundle/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in go' from /opt/build/cache/bundle/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:inprogram' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/exe/jekyll:15:in <top (required)>' from /opt/build/cache/binstubs/jekyll:27:inload' from /opt/build/cache/binstubs/jekyll:27:in <main>' /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-postcss-0.5.0/lib/jekyll-postcss/socket.rb:62:ininitialize': Cannot assign requested address - connect(2) for localhost port 8124 (Errno::EADDRNOTAVAIL) from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-postcss-0.5.0/lib/jekyll-postcss/socket.rb:62:in open' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-postcss-0.5.0/lib/jekyll-postcss/socket.rb:62:instart_dev_server' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-postcss-0.5.0/lib/jekyll-postcss/socket.rb:13:in initialize' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-postcss-0.5.0/lib/jekyll/converters/postcss.rb:16:innew' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-postcss-0.5.0/lib/jekyll/converters/postcss.rb:16:in block in initialize' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-postcss-0.5.0/lib/jekyll/converters/postcss.rb:16:infetch' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-postcss-0.5.0/lib/jekyll/converters/postcss.rb:16:in initialize' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:321:innew' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:321:in block (2 levels) in instantiate_subclasses' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:321:inmap!' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:321:in block in instantiate_subclasses' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:319:intap' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:319:in instantiate_subclasses' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:133:insetup' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:36:in initialize' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:30:innew' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:30:in process' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:inblock in process_with_graceful_fail' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in each' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:inprocess_with_graceful_fail' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:18:in block (2 levels) in init_with_program' from /opt/build/cache/bundle/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:inblock in execute' from /opt/build/cache/bundle/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in each' from /opt/build/cache/bundle/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:inexecute' from /opt/build/cache/bundle/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in go' from /opt/build/cache/bundle/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:inprogram' from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-4.2.2/exe/jekyll:15:in <top (required)>' from /opt/build/cache/binstubs/jekyll:27:inload' from /opt/build/cache/binstubs/jekyll:27:in `

' ​ 6:02:34 PM: build.command failed
6:02:34 PM: ──────────────────────────────────────────────────────────────── 6:02:34 PM: ​ 6:02:34 PM: Error message 6:02:34 PM: Command failed with exit code 1: jekyll build (https://ntl.fyi/exit-code-1) 6:02:34 PM: ​ 6:02:34 PM: Error location 6:02:34 PM: In Build command from Netlify app: 6:02:34 PM: jekyll build 6:02:34 PM: ​ 6:02:34 PM: Resolved config 6:02:34 PM: build: 6:02:34 PM: command: jekyll build 6:02:34 PM: commandOrigin: ui 6:02:34 PM: publish: /opt/build/repo/_site 6:02:34 PM: publishOrigin: ui 6:02:36 PM: Build failed due to a user error: Build script returned non-zero exit code: 2 6:02:36 PM: Failing build: Failed to build site 6:02:36 PM: Finished processing build request in 2m48.388s

gouravkhunger commented 1 year ago

Hey, jekyll build doesn't work on netlify if the PostCSS plugin is installed. Change your build command to bundle exec jekyll build.

If still doesn't work, add a JEKYLL_ENV environment variable with value development/production.

More information: https://answers.netlify.com/t/deploy-failing-jekyll-tailwind-css-postcss/41017/7

Note: If you are looking to use this theme for personal/commercial use, you need to abide by our Licensing terms available here and here. Please preserve the attribution terms in the footer. Thank you!