austingebauer / devise

A fast, minimal, responsive Hugo theme for blogs.
https://themes.gohugo.io/devise
MIT License
103 stars 56 forks source link

TOCSS fails to transform in new commit #9

Closed karthiktadepalli1 closed 4 years ago

karthiktadepalli1 commented 4 years ago

Thanks for fixing the blockquotes issue - I updated devise and my website's CSS promptly disappeared. I got this result in the netlify logs:

8:43:50 AM: Error: Error building site: TOCSS: failed to transform "css/theme.scss" (text/x-scss): resource "scss/sass/override.scss_98c15e5cfa9dde742c16bc7669e70205" not found in file cache

To ensure it wasn't just an issue with my site, I built a new site to replicate this issue. Using blogdown in R:

> new_site(theme = "austingebauer/devise")
trying URL 'https://github.com/austingebauer/devise/archive/master.tar.gz'
downloaded 6.3 MB

WARN 2020/09/14 08:49:09 Markup type mmark is deprecated and will be removed in a future release. See https://gohugo.io//content-management/formats/#list-of-content-formats
processing 22 content files
Warning: You are recommended to ignore certain files in config.toml: set the option ignoreFiles = ["\\.Rmd$", "\\.Rmarkdown$", "_files$", "_cache$"]
Rendering content/post/2015-07-23-r-rmarkdown.Rmd
Building sites … WARN 2020/09/14 08:49:11 Markup type mmark is deprecated and will be removed in a future release. See https://gohugo.io//content-management/formats/#list-of-content-formats
Total in 1466 ms
Error: Error building site: TOCSS: failed to transform "css/theme.scss" (text/x-scss): resource "scss/sass/override.scss_98c15e5cfa9dde742c16bc7669e70205" not found in file cache

Edit: the same error replicates with a normal hugo build.

hugo new site new_site
cd new_site 
git init 
git submodule add https://github.com/austingebauer/devise.git themes/devise
echo "theme = \"devise\"" >> config.toml 
hugo
austingebauer commented 4 years ago

Thanks for opening this, @karthiktadepalli1!

The issue should be fixed in ae5ffa728e257a035ebaf04a964f829f58e2c46f. Please give it a try with the latest version of the theme. I successfully tested the fix against the hugo new site example that you provided.

karthiktadepalli1 commented 4 years ago

That's weird, because I'm trying to rerun the hugo example and the same error as before is repeating. I don't think it's an issue with not getting the latest version, because git log shows the referenced commit and I can even see the code from that commit. Is there anything I can run to see why this might be different for me and you?

austingebauer commented 4 years ago

Mind running hugo version to see which hugo version you're running? I just ran through the hugo new site example again to ensure that it compiles correctly. Happy to help figure out what's different for us and get this fixed!

Output from my hugo new site run:

➜  Desktop hugo new site new_site
Congratulations! Your new Hugo site is created in /Users/austingebauer/Desktop/new_site.

Just a few more steps and you're ready to go:

1. Download a theme into the same-named folder.
   Choose a theme from https://themes.gohugo.io/ or
   create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
   with "hugo new <SECTIONNAME>/<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".

Visit https://gohugo.io/ for quickstart guide and full documentation.
➜  Desktop cd new_site
➜  new_site git init
Initialized empty Git repository in /Users/austingebauer/Desktop/new_site/.git/
➜  new_site git:(master) ✗ git submodule add https://github.com/austingebauer/devise.git themes/devise
Cloning into '/Users/austingebauer/Desktop/new_site/themes/devise'...
remote: Enumerating objects: 448, done.
remote: Counting objects: 100% (448/448), done.
remote: Compressing objects: 100% (400/400), done.
remote: Total 6681 (delta 87), reused 262 (delta 39), pack-reused 6233
Receiving objects: 100% (6681/6681), 16.13 MiB | 8.77 MiB/s, done.
Resolving deltas: 100% (1359/1359), done.
➜  new_site git:(master) ✗ echo "theme = \"devise\"" >> config.toml
➜  new_site git:(master) ✗ hugo

                   | EN
-------------------+-----
  Pages            |  7
  Paginator pages  |  0
  Non-page files   |  0
  Static files     | 16
  Processed images |  0
  Aliases          |  0
  Sitemaps         |  1
  Cleaned          |  0

Total in 270 ms
➜  new_site git:(master) ✗ hugo version
Hugo Static Site Generator v0.73.0/extended darwin/amd64 BuildDate: unknown
➜  new_site git:(master) ✗
karthiktadepalli1 commented 4 years ago
karthiktadepalli1@penguin:~$ hugo new site new_site
Congratulations! Your new Hugo site is created in /home/karthiktadepalli1/new_site.

Just a few more steps and you're ready to go:

1. Download a theme into the same-named folder.
   Choose a theme from https://themes.gohugo.io/ or
   create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
   with "hugo new <SECTIONNAME>/<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".

Visit https://gohugo.io/ for quickstart guide and full documentation.
karthiktadepalli1@penguin:~$ cd new_site 
karthiktadepalli1@penguin:~/new_site$ git init 
Initialized empty Git repository in /home/karthiktadepalli1/new_site/.git/
karthiktadepalli1@penguin:~/new_site$ git submodule add https://github.com/austingebauer/devise.git themes/devise
Cloning into '/home/karthiktadepalli1/new_site/themes/devise'...
remote: Enumerating objects: 448, done.
remote: Counting objects: 100% (448/448), done.
remote: Compressing objects: 100% (400/400), done.
remote: Total 6681 (delta 87), reused 262 (delta 39), pack-reused 6233
Receiving objects: 100% (6681/6681), 16.13 MiB | 3.90 MiB/s, done.
Resolving deltas: 100% (1359/1359), done.
karthiktadepalli1@penguin:~/new_site$ echo "theme = \"devise\"" >> config.toml 
karthiktadepalli1@penguin:~/new_site$ hugo
Total in 23 ms
Error: Error building site: TOCSS: failed to transform "css/theme.scss" (text/x-scss): resource "scss/sass/override.scss_98c15e5cfa9dde742c16bc7669e70205" not found in file cache
karthiktadepalli1@penguin:~/new_site$ hugo version
Hugo Static Site Generator v0.73.0-428907CC linux/amd64 BuildDate: 2020-06-23T16:30:43Z

I don't know what's going on here... there's no difference at all.

austingebauer commented 4 years ago

@karthiktadepalli1 - Yep, looks like we're getting different results for equivalent operations. I'll have a closer look to try to reproduce this!

austingebauer commented 4 years ago

Okay, finally took a look at this! It appears that this is/was a common issue seen by others in the Hugo community. For example, see:

The most common answer I see is to use the "extended" version of Hugo. Do you mind giving that a try? Here some instructions of how to install the extended version on different platforms: https://gohugo.io/getting-started/installing. Let me know if that works for you.

karthiktadepalli1 commented 4 years ago

I downloaded Hugo 0.75.1 extended version and used that - it worked for generating a new site. However, I was running into troubles deploying on my site, probably because of Netlify issues (it would build and preview in my local site).

For some reason, it works when I use the Netlify CLI tool to deploy directly as opposed to deploying through GitHub. I'm not familiar enough with Netlify to understand why that might be, but this fix works for me!

austingebauer commented 4 years ago

I'm glad that the fix ended up working for you. That's a bummer that it's not working for your Netlify workflow though. Perhaps you can ask someone from the Netlify or Hugo community as to why that'd be happening!

Closing this now. Thanks again. Feel free to drop in issues for other bugs or feature requests that you may have.