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

"kobweb export --layout static" doesn't generate any new files #146

Closed
blakelee opened this issue Mar 22, 2022 · 9 comments
Closed

"kobweb export --layout static" doesn't generate any new files #146

blakelee opened this issue Mar 22, 2022 · 9 comments
Labels
bug Something isn't working

Comments

@blakelee
Copy link

blakelee commented Mar 22, 2022

I followed the directions for setting up a static page for github pages here.
https://bitspittle.dev/blog/2022/staticdeploy#kobweb-to-the-rescue

I was able to generate the initial files after trying the instructions maybe 5 or so times. I then created a new page that works when I run kobweb run but when I try and generate the files with kobweb export --layout static no new files get made in the /docs folder.

This is happening with Kobweb CLI 0.9.7 on Mac

@blakelee blakelee added the bug Something isn't working label Mar 22, 2022
@bitspittle
Copy link
Collaborator

bitspittle commented Mar 22, 2022 via email

@bitspittle
Copy link
Collaborator

bitspittle commented Mar 22, 2022

Following my own steps, I wasn't able to reproduce your issue. I might be missing something that you're doing.

(I'm using Linux, also with 0.9.7 CLI, and libs version 0.9.10)

One question though - did you stop kobweb run before you did the kobweb export? Otherwise, it's possible those two commands are interfering with each other?

@blakelee
Copy link
Author

Yup, those are the repro steps. I'm on Mac 12.3 and my gradle/libs.versions.toml shows kobweb = "0.9.10"

If I stop the Kobweb server and then run the export the issue persists.

I just tried cloning my project and then running the command again and it seemed to generate the files. I'm wondering if there is some cache that is not being updated?

@bitspittle
Copy link
Collaborator

Actually, playing around with this a bit more and I think I got it to happen. Investigating...

It seems what may be important, not sure yet, is

  • changing the site root (e.g. to docs)
  • running kobweb export while kobweb run is still in progress.

@bitspittle
Copy link
Collaborator

I just tried cloning my project and then running the command again and it seemed to generate the files. I'm wondering if there is some cache that is not being updated?

One way or another, I'm jumping into Gradle-infested waters today.

I did find a reference to ".kobweb/site" hardcoded in my logic, from before I introduced the ability to configure it, which is causing my logic to not delete the directory before starting the export. I think this alone may fix it.

If you run into trouble again, can you try just deleting your docs/ folder instead, and rerunning the export? I think that will fix it.

@bitspittle
Copy link
Collaborator

OK! I think the issue was indeed my stale hardcoded reference to ".kobweb/site"

I'll try to push out a new version of the Kobweb libraries in the next few days which will have a fix for this (0.9.11). Until then, my apologies - please just delete the docs/ folder each time before you rerun kobweb export

Thanks again for reporting.

@blakelee
Copy link
Author

blakelee commented Mar 22, 2022

One interesting thing when I was trying to follow the initial directions is that I couldn't get the docs/ folder to generate at all. It took several attempts of deleting project and starting from scratch where finally at the end it would export properly and create the docs/ folder. I will give it a shot when it happens again. Thanks for your hard work.

@bitspittle
Copy link
Collaborator

Yikes, I never heard of anything like that. I'll keep an eye out for it. Feel free to open a new issue if you see that happening again especially after 0.9.11 goes out.

@bitspittle
Copy link
Collaborator

Heads up that 0.9.11 went out today, in case you wanted to upgrade your version and see if things work more consistently after that. (We can reopen this issue if not!)

I also changed the CLI binary to prevent users from doing an export while a server is already running, just in case that was related to these issues (even if not, I had wanted to do that for a while anyway). Latest CLI is now 0.9.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants