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

Error Generating site when using Docsy as a module #833

Closed
ITblacksheep opened this issue Jan 14, 2022 · 13 comments
Closed

Error Generating site when using Docsy as a module #833

ITblacksheep opened this issue Jan 14, 2022 · 13 comments

Comments

@ITblacksheep
Copy link

ITblacksheep commented Jan 14, 2022

Error: Error building site: TOCSS: failed to transform "scss/main.scss" (text/x-scss): SCSS processing failed: file "stdin", line 6, col 1: File to import not found or unreadable: ../vendor/bootstrap/scss/bootstrap. Both Prereq are installed.

@deining
Copy link
Collaborator

deining commented Jan 14, 2022

To my dismay I realized that #801 is not valid, module dependencies were inadvertently disabled in the final version that was merged. Sorry for that, I will author a PR that fixes this shortly.

Fortunately, there is a way to work around this. In your config.toml, remove the code block given in my installation/conversion instructions and add this block instead:

[[module.imports]]
  path = "github.com/twbs/bootstrap"
  disable = false
[[module.imports.mounts]]
  source = "scss"
  target = "assets/vendor/bootstrap/scss"
[[module.imports]]
  path = "github.com/FortAwesome/Font-Awesome"
[[module.imports.mounts]]
  source = "scss"
  target = "assets/vendor/Font-Awesome/scss"
[[module.imports]]
    path = "github.com/google/docsy"

This should get you up and running. Please let me know if this solves your problem.

@kneyugn
Copy link

kneyugn commented Jan 14, 2022

Hello! Thanks for working on this. I am also seeing this issue and the copying and pasting the above into the config did not resolve it. Do I need to run any command again? I followed this guide:

https://deploy-preview-802--docsydocs.netlify.app/docs/updating/convert-site-to-module/#work-around-a-known-bug-in-gos-module-management

@deining
Copy link
Collaborator

deining commented Jan 14, 2022

Do I need to run any command again?

To be on the safe side, you can run:

hugo mod clean

Afterwards, for diagnostic purposes, you may run hugo mod graph, which should list 3 module dependencies:

$ hugo mod graph
hugo: downloading modules …
hugo: collected modules in 13739 ms
yourModule github.com/twbs/bootstrap@v4.6.1+incompatible
yourModule github.com/FortAwesome/Font-Awesome@v0.0.0-20210804190922-7d3d774145ac
yourModule github.com/google/docsy@v0.0.0-20220114111958-b103aadf9739

If you don't see these 3 dependencies, you are in trouble and it won't work.

Ah, and don't forget to remove or uncomment the following line:

theme = "docsy"

This isn't explicitly mentioned in the conversion docs, I just added the missing part (together with some minor improvements).

@LisaFC
Copy link
Collaborator

LisaFC commented Jan 17, 2022

This should be fixed in #837, right?

@kneyugn
Copy link

kneyugn commented Jan 17, 2022

This should be fixed in #837, right?

Hello @LisaFC, It isn't resolved for me.

I removed docsy as a theme in config.toml, ran hugo mod clean

hugo mod graph

< my-module > github.com/twbs/bootstrap@v5.1.3+incompatible
< my-module > github.com/FortAwesome/Font-Awesome@v4.7.0+incompatible
< my-module > github.com/google/docsy@v0.0.0-20220117100953-fbc516e8d1dd

@deining
Copy link
Collaborator

deining commented Jan 17, 2022

hugo mod graph

< my-module > github.com/twbs/bootstrap@v5.1.3+incompatible

This should be bootstrap@v4.6.1, not @v5.1.3. You pulled in the latest version, that's incorrect.

< my-module > github.com/FortAwesome/Font-Awesome@v4.7.0+incompatible

This should translate to Font-Awesome@7d3d774145ac, which is 5.15.4. Font-Awesome@v4.7.0 is ways to old.

< my-module > github.com/google/docsy@v0.0.0-20220117100953-fbc516e8d1dd

This one is correct.

Do you want to convert an existing site or start from scratch?
Module setup worked flawlessly for me, I tried it out this morning without any problems.

If you can't make it work, present error messages or contact me off-list (see github account info).

@kneyugn
Copy link

kneyugn commented Jan 17, 2022

Hey @deining, I am getting the same error as above. I am converting an existing project. How do I ensure that my installs have the latest Font-Awesome and Bootstrap. I am not familiar with how go or Hugo modules work.

@ITblacksheep
Copy link
Author

ITblacksheep commented Jan 17, 2022

@deining Ok I am passed the original error but now my site doesn't show anything. It is not understanding the language. I am going to flip back to non module and then see if it still happens.

@ITblacksheep
Copy link
Author

ITblacksheep commented Jan 17, 2022

So when switching back to git submodule I am getting the same issues as #836. The fix for #836 did fix the font awesome issue, but now back to not rendering any content under a lang folder. If i move all the content under content it renders fine, but if i move it into content\en it renders the top and bottom divs but no actual content.

@huehnerlady
Copy link
Contributor

With github submodules I have the same problem that I'll get problems with rendering, the sidebar shows a navbar from a different part of the website (blog?) that I am on, the main page is not rendering at all (apart from header) and some other pages (eg. the blog) are also not rendering. I have the same setup with the language folder

@ITblacksheep
Copy link
Author

@deining Should we close this out as the original issue has been fixed and open a new one up for the rendering issue?

@deining
Copy link
Collaborator

deining commented Jan 18, 2022

@deining Should we close this out as the original issue has been fixed

Yes, please.

and open a new one up for the rendering issue?

Again, yes. Can you provide as many details as possible please? Is your project available publicly (github, gitlab, or so) or can we get access to it? Ideally we could reproduce the faulty behaviour locally. That would make it much easier to track it down. Thanks.

@chalin
Copy link
Collaborator

chalin commented Jan 18, 2022

Closing per consensus.

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

6 participants