Lym Lin
Lym Lin

Reputation: 3

Failure to deploy on netlify: failed during stage 'building site': Build script returned non-zero exit code: 255

I failed to deploy my file, which was developed from blogdown (dev, R 3.6.1) and hugo (0.57.2) on the netlify platform.

I have tried to update the URL of my config.toml file from \ to my target web name https*.com\ . Also, I created a netlify.toml at the root directory. Both of them did not make any sense.

Local development is fine, while the netlify could not be deployed well.

failed during stage 'building site': Build script returned non-zero exit code: 255

Related code:

 blogdown::new_site(theme = "gcushen/hugo-academic")
# netlify
[build]
  publish = "public"
  command = "hugo"
[context.production.environment]
  HUGO_VERSION = "0.57.2"
  HUGO_ENV = "production"
  HUGO_ENABLEGITINFO = "true"
[context.branch-deploy.environment]
  HUGO_VERSION = "0.57.2"
# 0.57.2
blogdown::hugo_version()

Upvotes: 0

Views: 721

Answers (1)

Frank van Leth
Frank van Leth

Reputation: 11

This answer is probably too late, but I just had the same issue. It which was solved by the Netlify team.

Trying to deploy through Github provides a built command "hugo". This caused the error message.

Go to your netlify page and the domain settings on the failed deploy. Remove "hugo" in the command built and retry to deploy.

Upvotes: 1

Related Questions