Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to fix the Netlify error #81

Closed
Nexus-Gits opened this issue Jul 13, 2023 · 1 comment
Closed

How to fix the Netlify error #81

Nexus-Gits opened this issue Jul 13, 2023 · 1 comment

Comments

@Nexus-Gits
Copy link
Contributor

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:in start_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:in new'
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:in fetch'
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:in new'
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:in map!'
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:in tap'
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:in setup'
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:in new'
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:in block 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:in process_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:in block 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:in execute'
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:in program'
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:in load'
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:in initialize': 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:in start_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:in new'
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:in fetch'
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:in new'
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:in map!'
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:in tap'
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:in setup'
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:in new'
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:in block 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:in process_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:in block 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:in execute'
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:in program'
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:in load'
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
Copy link
Member

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants