-
Notifications
You must be signed in to change notification settings - Fork 922
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
Docsy initial build fails when creating new site #1075
Comments
Similar problem here trying to build a new site under MacOS and getting docsy on 2022-06-25 with Start building sites … When using version 0.3.0 with cd themes everything works. It seems that a later commit introduced an error. |
Interesting, I wonder how many commits we'd have to comb to find the issue. |
running an
now looks like this:
I am still seeing this:
|
Following your steps, when I
is this what you were referring to? |
Even the example site is broken:
|
At this point, the only real workaround is to not attempt to build static pages. Instead just serve up some form of your repository and execute |
|
same problem, waiting for conclusion |
The issue is commit b6d85f5, where Lines 6 to 10 in 2c86307
The main scss file tries to access those from the submodules, but they got deleted. Edit: ah right, looks like we need npm now even for static building. Tbh I prefer to revert it, as it means we need a CI image that has both hugo and npm, or need to install npm, which takes unnecessary CI time. |
TLDR; works for me (for details, see below) - try again with release 0.4.0. Hi all. Firstly, release 0.4.0 is out: can you try it out and let us know if you still have issues? Now that we have an official release process, we no longer officially support docsy Using release 0.4.0, I'm unable to reproduce the problems you (@mikeBoterf) reported in the opening comment. In particular, when creating a new website by following the instructions given in Prerequisites and installation and Option 1: Docsy as a Git submodule as shown here: $ hugo new site myproject
...
$ cd myproject
$ git init
...
$ git submodule add --depth 1 https://github.com/google/docsy.git themes/docsy
...
$ echo 'theme = "docsy"' >> config.toml
$ (cd themes/docsy && npm install)
...
$ npm install -D autoprefixer postcss-cli postcss
...
$ hugo -v
Start building sites …
hugo v0.101.0+extended darwin/amd64 BuildDate=unknown
INFO 2022/07/01 10:28:25 syncing static files to /
...
| EN
-------------------+-----
Pages | 7
Paginator pages | 0
Non-page files | 0
Static files | 40
Processed images | 0
Aliases | 0
Sitemaps | 1
Cleaned | 0
Total in 1940 ms
$ hugo version
hugo v0.101.0+extended darwin/amd64 BuildDate=unknown Can you try these instructions and let us know if they work for you too? |
@stephanlachnit - for the officially supported ways of using Docsy, see Installation options. If you'd like another scenario supported, consider creating an issue or starting a discussion and I'll be glad to chime in. (In particular, I'd be curious to know how, in your setup, do you get around using |
|
following these instructions which were updated, thank you @docsy-devs
|
trying to cover my bases
|
|
@chalin asked:
Yes, they work for me 😄. |
@mikeBoterf - Thanks for all that, but I still can reproduce it, and it's working for @deining too. One thing comes to mind: ensure that you're using the latest LTS version of Node. I recall a project having problems when they were using an earlier version of Node. Can you update and give it another try? |
I'll post what I have and what it upgraded to. That is probably an issue. |
Updating nodejs seems to have broken my nodejs path.. BUT it solved my hugo problem
|
I believe I for some reason installed npm.. which installed an ancient 10.x version of nodejs I upgraded to 18 which pushed npm to 8.. I believe my npm was at a 6 or so. BUMMER |
thanks for being patient @chalin |
nvm about the path it's just |
I'm glad that this got sorted out. (FYI, I'll be following through with #1081.) |
Hopefully nobody should have to review this issue in the future. |
@stephanlachnit Mind revisiting this with me?
I have npm and hugo extended both installed, I am attempting to upgrade a site (fluxcd.io) that has been converted to use Hugo as a go module, but I am unfortunately stumped by this error:
Your post with the similar error is the only thing I found that comes close! I don't understand why I get this error at all. Sorry to bother you, but it looked like you were on the cusp of explaining something that it seems like I'll need to reckon with. I'm upgrading Docsy v0.6.0 to v0.9.0, trying to figure out the best way to include a bit of javascript in my website, but I'd like to upgrade to the latest module everywhere I can, and I see this one has a breaking upgrade of Bootstrap. I just can't seem to get a grasp on how the go module is supposed to invoke npm, whether it did so or not; I have a bunch of My site repo is public, if it helps, I think this issue is a repo problem, but no way to be sure without tearing my own hair out unless I ask for help. 🤯 |
@kingdonb I'm not using docsy as a go module much, but AFAIK when you run hugo it should download the go modules related to the project. If it doesn't, you can run |
This advice seems pretty well buried around notes that mention https://www.docsy.dev/docs/get-started/other-options/#docsy-npm-install-side-effect some kind of "NPM install side effect" that I should have no reason to expect when I'm using hugo as a go module, but I wonder if it has some impact. I think someone has already converted us to use docsy as a hugo module. It looks like I am including the bootstrap 5.2.3 correctly, from
I wonder if one of the mounts that was listed in my hugo.yaml has an impact on the result (removing them doesn't seem to help): https://github.com/fluxcd/website/blob/main/hugo.yaml#L21 I wonder also if we've done some kind of reach behind the counter thing to import definitions from docsy that has somehow shot us in the foot upon upgrading. The presence of these mounts, and their absence in the docsy-example repo, gives me pause. Anyway, thank you for responding @fekete-robert |
Build error
Versions
Hugo
Golang
I'm not even sure where to look for the source of the issue. I am also following the docs on how to start from scratch. I don't think this is an npm package issue as I have the required modules installed globally. The issue for the missing npm which produces a similar issue was observed by myself, but I resolved that issue by installing what was missing. This site will execute under
hugo server
. Should I start pulling things from the example site until it works?The text was updated successfully, but these errors were encountered: