maragudk / gomponents-starter-kit

A starter kit for building a web app with gomponents, HTMX, and TailwindCSS in Go.
https://www.gomponents.com
MIT License
35 stars 1 forks source link

Getting problems while following the README #3

Open ssenthilanand opened 1 day ago

ssenthilanand commented 1 day ago

I have not done Go beyond Hello World. Saw this on HN and decided to try out. I decided to clone the project from the command line. On running make start

In Windows it tries to download macOS version of tailwindcss and obviously fails. I check the Makefile and find it does not support Windows. I tried changing the TAILWINDCSS_OS_ARCH to Windows specific bits and it does not work.

On Debian running under WSL, after uncommenting the linux-x64 line, the build goes normally but then errors out with the following error:

make start ./tailwindcss -i tailwind.css -o public/styles/app.css --minify

Rebuilding...

Done in 530ms. go run ./cmd/app go: downloading maragu.dev/env v0.2.0 go: downloading golang.org/x/sync v0.8.0 go: downloading github.com/go-chi/chi/v5 v5.1.0 go: downloading maragu.dev/gomponents v1.0.0 go: downloading maragu.dev/gomponents-htmx v0.6.1 go: downloading maragu.dev/httph v0.3.3 go: downloading github.com/mitchellh/mapstructure v1.5.0 sql/database.go:8:2: package log/slog is not in GOROOT (/usr/lib/go-1.19/src/log/slog) sql/database.go:9:2: package math/rand/v2 is not in GOROOT (/usr/lib/go-1.19/src/math/rand/v2) make: *** [Makefile:26: start] Error 1

I was running go from the Debian repositories.

I then downloaded the latest go from go.dev and installed it. Now everything works correctly.

IMHO you should mention somewhere that Windows is not supported and also the minimum go version the project needs.

markuswustenberg commented 18 hours ago

Hi @ssenthilanand , thanks for this. I haven't been on Windows for over 20 years, so I have no idea how things work there. :) I usually focus on getting things working on Mac and Linux, since that covers my personal case as well as the typical production deployment (if not using Docker, like here).

I'm not sure how WSL works, I think you should be able to use the TailwindCSS CLI with linux-x64 or whatever your architecture is?

The rest is because your bundled Go version is indeed too old. The project Go version can be seen inside the go.mod file.