getzola / zola

A fast static site generator in a single binary with everything built-in. https://www.getzola.org
https://www.getzola.org
MIT License
12.99k stars 918 forks source link

Zola 0.19 and ViteJs don't go together well? #2563

Open gacallea opened 1 week ago

gacallea commented 1 week ago

Bug Report

I have been using Zola as CMS with custom templates/html + daisyUI for my label site since Zola 0.17 and everything ran smoothly until 0.19. I haven't been able to serve (to add content) nor deploy my site since.

Environment

macOS Sonoma 14.5 Zola version: 0.19.1 (installed with brew)

Expected Behavior

Zola + Vitejs should just work together as they did until 0.18.x

Current Behavior

I run zola serve and vite serve with "dev": "ENV='development' concurrently 'vite serve' 'zola serve'" from package.json, this is the full output using RUST_BACKTRACE=full because 1 suggested it:

╰─❯ npm run dev

> gentlewashrec@1.0.0 dev
> ENV='development' RUST_BACKTRACE=full concurrently 'vite serve' 'zola serve'

[1] Building site...
[1] Checking all internal links with anchors.
[1] > Successfully checked 0 internal link(s) with anchors.
[1] -> Creating 50 pages (0 orphan) and 6 sections
[1] Done in 21ms.
[1]
[1] Web server is available at http://127.0.0.1:1111/ (bound to 127.0.0.1:1111)
[1]
[1] Listening for changes in /redacted/Sites/gentlewashrecords.com/{config.toml,content,static,templates}
[1] Press Ctrl+C to stop
[1]
[0]
[0]   VITE v5.3.2  ready in 208 ms
[0]
[0]   ➜  Local:   http://localhost:5173/
[0]   ➜  Network: use --host to expose
[1] thread 'main' panicked at src/fs_utils.rs:151:9:
[1] internal error: entered unreachable code: Got a change in an unexpected path: /vite.config.js.timestamp-1719851488362-08f6db25a956e.mjs
[1] stack backtrace:
[1]    0:        0x10547e304 - __mh_execute_header
[1]    1:        0x104b33b84 - __mh_execute_header
[1]    2:        0x10546d30c - __mh_execute_header
[1]    3:        0x10547e120 - __mh_execute_header
[1]    4:        0x10547a2d4 - __mh_execute_header
[1]    5:        0x10547b8d0 - __mh_execute_header
[1]    6:        0x10547e698 - __mh_execute_header
[1]    7:        0x10547e600 - __mh_execute_header
[1]    8:        0x10547a79c - __mh_execute_header
[1]    9:        0x1056787fc - __mh_execute_header
[1]   10:        0x1049d9218 - __mh_execute_header
[1]   11:        0x1049d16e0 - __mh_execute_header
[1]   12:        0x1049dd024 - __mh_execute_header
[1]   13:        0x10498a8f0 - __mh_execute_header
[1]   14:        0x1049e9664 - __mh_execute_header
[1] zola serve exited with code 101
^C[0] vite serve exited with code SIGINT

Step to reproduce

Easier said than done. I can give access to the private repo to Zola team for complete details and possibly replication.

I am available for any more details (like package.json, configs, etc...) on request. I didn't want to spam.

Keats commented 1 week ago

That's a bug, this file change should be ignored but isn't for some reason.

Are those vite.config.js.timestamp-1719851488362-08f6db25a956e.mj files in the /redacted/Sites/gentlewashrecords.com/ directory?

gacallea commented 1 week ago

I am glad it is! I would have had no idea otherwise :) If there’s anything I can do to help, I’d be glad to. Cheers

On Mon, Jul 1, 2024 at 9:12 PM, Vincent Prouillet @.***> wrote: That's a bug, this file change should be ignored but isn't for some reason.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Keats commented 1 week ago

Is the repo available somewhere?

gacallea commented 1 week ago

It is private but I am willing to give Zola team temporary access if this can help. I am no Universal but I’d like to keep it private if I can.
On Mon, Jul 1, 2024 at 9:17 PM, Vincent Prouillet @.***> wrote: Is the repo available somewhere?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

eberkund commented 1 week ago

I have the same issue with Vite. Let me know if I can be of any help.

Keats commented 1 week ago

Is there a repo somewhere I can use to debug? Even a very basic version with the minimum setup to reproduce the issue

eberkund commented 1 week ago

Is there a repo somewhere I can use to debug? Even a very basic version with the minimum setup to reproduce the issue

I sent you an invite to my private repo.

Keats commented 1 week ago

npm run watch works for me in your repo, it picks up the changes to markdown or TS

gacallea commented 1 week ago

@Keats I've invited you to my repo too. I hope this can help.

Keats commented 1 week ago

Yep i can reproduce with yours, thanks.

gacallea commented 1 week ago

I haven't been able to update the config.toml for 0.19 because of the bug but I am sure you have figured that out :)

generate_feeds = true
feed_filenames = ["atom.xml"]
Keats commented 1 week ago

That should be fixed on the next branch

gacallea commented 1 week ago

That should be fixed on the next branch

that was quick! whoop whoop!

Thank you so very much indeed for this and for zola :)

gacallea commented 1 week ago

ps: let me know when I can remove the collaborator status. please.

Keats commented 1 week ago

You can remove me