maddalax / htmgo

htmgo - build simple and scalable systems with go + htmx
https://htmgo.dev
MIT License
662 stars 17 forks source link

Tailwind Exits when you run 'htmgo watch' #67

Closed JohnKinyanjui closed 2 hours ago

JohnKinyanjui commented 4 hours ago

When you run htmgo watch tailwind crashes

2024/11/01 13:45:02 ERROR Error running command:  error="exit status 1" command=tailwind
maddalax commented 4 hours ago

If you create a fresh new project with the starter template, does it work? What OS are you on, windows right?

JohnKinyanjui commented 3 hours ago

Yes am on windows, I created a new project tried it still giving the same error now

maddalax commented 3 hours ago

Yes am on windows, I created a new project tried it still giving the same error now

@JohnKinyanjui Can you try updating the htmgo cli again and try a new project?

set GOPROXY=direct && go install github.com/maddalax/htmgo/cli/htmgo@latest
JohnKinyanjui commented 3 hours ago
Running in watch mode
Starting processes...
Generating CSS...
2024/11/01 15:14:35 Failed to format source: 4:26: unknown escape sequence (and 5 more errors)

Starting server...
__htmgo\assets\assets-generated.go:1:1: expected 'package', found 'EOF'

did that now this is the error and even set the package name the functions for assets do not exists

maddalax commented 3 hours ago
Running in watch mode
Starting processes...
Generating CSS...
2024/11/01 15:14:35 Failed to format source: 4:26: unknown escape sequence (and 5 more errors)

Starting server...
__htmgo\assets\assets-generated.go:1:1: expected 'package', found 'EOF'

did that now this is the error and even set the package name the functions for assets do not exists

Are you sure it updated? Can you try re-running it again

set GOPROXY=direct && go install github.com/maddalax/htmgo/cli/htmgo@latest

Delete the __htmgo folder as well and let it re-gen when you run htmgo watch

maddalax commented 3 hours ago

https://github.com/user-attachments/assets/72c894bd-2a7f-41ad-90e6-362c0a601ed7

I just spun up the template on my windows vm and it is working for me. Are you on windows 11? Whats your go version?

JohnKinyanjui commented 3 hours ago

i switched up to WSL it seems to be working fine, for windows i think there an issue with getting the latest package

Screenshot 2024-11-01 152207

JohnKinyanjui commented 3 hours ago

also am using go version go1.23.2 windows/amd64 , i just uninstalled the whole package and reinstalled it again it now working

maddalax commented 3 hours ago

awesome, yeah its possible when you were installing it, GOPROXY wasn't set, when thats not set, there is caching on the proxy.golang site to install packages, so it may have been installing an old version

I'm adding a version command to cli for the next version

htmgo version
JohnKinyanjui commented 3 hours ago

yah it seemed that way, thanks also for the help, that will be really helpful in the long run