Skip to content

Hugo-extended builds that previously successfully deployed now require explicit hugo-extended install #1392

@kaganjd

Description

@kaganjd

Describe the bug
A user who was previously successfully deploying hugo-extended builds started seeing build failures due to scss handling errors:

4:35:55 PM: $ hugo --gc --minify --enableGitInfo --baseURL $URL --environment development
4:35:55 PM: DEBUG target={ platform: 'linux', arch: 'x64' }, hugo={ version: '0.71.0' }
4:35:55 PM: DEBUG searching executable at </opt/build/repo/node_modules/hugo-cli/tmp/hugo_0.71.0_linux_amd64>
4:35:55 PM: INFO hugo not found. Attempting to fetch it...
4:35:55 PM: DEBUG downloading archive from <https://github.com/gohugoio/hugo/releases/download/v0.71.0/hugo_0.71.0_Linux-64bit.tar.gz>
4:35:56 PM: INFO fetched hugo 0.71.0
4:35:56 PM: INFO extracting archive...
4:35:57 PM: DEBUG extracted archive to </opt/build/repo/node_modules/hugo-cli/tmp>
4:35:57 PM: INFO hugo available, let's go!
4:35:57 PM: Building sites …
4:37:57 PM: ERROR 2020/05/27 23:37:57 TOCSS: failed to transform "scss/main.scss" (text/x-scss): resource "scss/scss/main.scss_df0fcb6fcf7ac0465cc4f11d40f9fe96" not found in file cache
4:37:57 PM: Total in 120386 ms
4:37:57 PM: Error: Error building site: TOCSS: failed to transform "scss/main.scss" (text/x-scss): resource "scss/scss/main.scss_e59e0ecc24dedce3dd5dba3ad899859c" not found in file cache

This line:
4:35:55 PM: DEBUG downloading archive from <https://github.com/gohugoio/hugo/releases/download/v0.71.0/hugo_0.71.0_Linux-64bit.tar.gz>
is the correct Hugo version number but it is not the extended version.

User said:

It looks like the new version of Netlify build looks for the hugo-extended npm package first and if it doesn't find it it'll fall back to the lesser version preventing the SCSS features of Hugo.

He fixed this issue by running npm install hugo-extended --save-dev, which previously was not required.

Deploy logs
Logs for the following are here (not public):

  • successful deploy before Build
  • failed deploy with Build
  • successful deploy with Build, after npm install hugo-extended

Additional context
The person who ran into this created a post in Hugo forums explaining: https://discourse.gohugo.io/t/netlify-build-error-255-tocss-troubleshooting/25887/5

Metadata

Metadata

Assignees

Labels

type: bugcode to address defects in shipped code

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions