HugoBlox / hugo-blox-builder

🚨 GROW YOUR AUDIENCE WITH HUGOBLOX! 🚀 HugoBlox is an easy, fast no-code website builder for researchers, entrepreneurs, data scientists, and developers. Build stunning sites in minutes. 适合研究人员、企业家、数据科学家和开发者的简单快速无代码网站构建器。用拖放功能、可定制模板和内置SEO工具快速创建精美网站!
https://hugoblox.com/templates/
MIT License
8.2k stars 2.9k forks source link

Error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css" on local machine #1665

Closed GohEeEn closed 4 years ago

GohEeEn commented 4 years ago

Hi everyone, I am a beginner in Hugo and trying to use it to build a personal static website.

Describe the bug

I start the project by following the template installation from this link and Hugo Static Site Generator with this link too. While I am trying to lauch the original project source code on local machine with command :

hugo

and the following errors got returned

Building sites … ERROR 2020/04/26 14:21:30 render of "section" failed: execute of template failed: template: section/publication.html:5:3: executing "section/publication.html" at <partial "site_head" .>: error calling partial: "C:\Users\user\Desktop\GitHub\academic-kickstart\themes\academic\layouts\partials\site_head.html:131:56": execute of template failed: template: partials/site_head.html:131:56: executing "partials/site_head.html" at <resources.Concat>: error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css"
ERROR 2020/04/26 14:21:30 render of "section" failed: execute of template failed: template: section/talk.html:5:3: executing "section/talk.html" at <partial "site_head" .>: error calling partial: "C:\Users\user\Desktop\GitHub\academic-kickstart\themes\academic\layouts\partials\site_head.html:131:56": execute of template failed: template: partials/site_head.html:131:56: executing "partials/site_head.html" at <resources.Concat>: error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css"
ERROR 2020/04/26 14:21:30 render of "home" failed: execute of template failed: template: index.html:5:3: executing "index.html" at <partial "site_head" .>: error calling partial: "C:\Users\user\Desktop\GitHub\academic-kickstart\themes\academic\layouts\partials\site_head.html:131:56": execute of template failed: template: partials/site_head.html:131:56: executing "partials/site_head.html" at <resources.Concat>: error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css"
ERROR 2020/04/26 14:21:30 render of "taxonomyTerm" failed: execute of template failed: template: authors/terms.html:5:3: executing "authors/terms.html" at <partial "site_head" .>: error calling partial: "C:\Users\user\Desktop\GitHub\academic-kickstart\themes\academic\layouts\partials\site_head.html:131:56": execute of template failed: template: partials/site_head.html:131:56: executing "partials/site_head.html" at <resources.Concat>: error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css"
ERROR 2020/04/26 14:21:30 failed to render pages: render of "section" failed: execute of template failed: template: section/post.html:5:3: executing "section/post.html" at <partial "site_head" .>: error calling partial: "C:\Users\user\Desktop\GitHub\academic-kickstart\themes\academic\layouts\partials\site_head.html:131:56": execute of template failed: template: partials/site_head.html:131:56: executing "partials/site_head.html" at <resources.Concat>: error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css"
Total in 539 ms
Error: Error building site: TOCSS: failed to transform "main_parsed.scss" (text/x-scss): resource "scss/scss/main.scss_6c95cc1249b26b124274204dbf970c34" not found in file cache

The same error is returned by lauching both the following commands individually :

./view.sh
or
hugo server

To Reproduce

Steps to reproduce the behavior:

  1. Go to the root directory of the template project from this link or my project directory from your local machine.
  2. Execute Hugo command hugo or hugo server or lauching script file view.sh
  3. The error as the described on above will be returned

Expected behavior

The static site content should be lauched successfully, since no modification has been done to the installed codebase.

Technical details:

gcushen commented 4 years ago

Academic requires the full version of Hugo, Hugo Extended, see the guide at https://sourcethemes.com/academic/docs/install/#install-with-git .

For support, see https://github.com/gcushen/hugo-academic/blob/master/.github/support.md

gmonce commented 4 years ago

Hi, I am getting the same issue. I have installed Hugo for Windows 10. Details:

Hugo Static Site Generator v0.69.2-EC9DCF30 windows/amd64 BuildDate: 2020-04-24T07:51:17Z

Everything was working ok, I deleted and cloned again the website repo, and since that moment I am getting the same error.

shaunxwang commented 4 years ago

I got the same error, I typed the wrong theme in "config/_default/params.toml". I typed "classic" but there was no classic theme in "themes/academic/data/themes/". I was able to "hugo server" successfully after corrected the "theme" in "config/_default/params.toml".

Hope this helps.

GoGoGoDoge commented 4 years ago

I have the same issue on Mac. The default brew install hugo option won't provide extended tags. To solve the issue, have to pull the hugo repo and install it with go install --tags extended

jmbruel commented 4 years ago

idem here! On a Mac, extended install, problem is still open. Please reopen the issue.