livebud / livebud/bud

Dev server breaks as soon as I generate a new controller

Open
#407 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.6k
Forks
175
PR merge metrics
No merged PRs in 30d

Description

Hey there!

I was going to give bud a shot and unfortunately I got stuck right after generating a new controller, getting this error:

```
| genfs: open "bud/cmd/app/main.go". genfs: open "bud/internal/web/web.go". genfs: open
"bud/internal/web/controller/controller.go". framework/controller: unable to load. controller: unable to load:
"/snap/go/current/src/context" can't be outside the module directory "/snap/go/10257/src"
```

To reproduce:

```sh
curl -sf https://raw.githubusercontent.com/livebud/bud/main/install.sh | sh
bud create hello
cd hello

# in one tab
bud run

# in another tab
bud new controller home:/ index
```

As soon as the browser attempts to refresh the page that error occurs, the browser hangs and the request never completes. If I stop the server and try to spin it up again I get the same error and it never comes up.

Some information about my environment:
- Ubuntu 22.04.2
- `go version go1.20.6 linux/amd64` installed with `snap install`
- `bud: 0.2.8`
- `svelte: 3.47.0`
- `react: 18.0.0`

go env (click to expand)

```
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/fabio/.cache/go-build"
GOENV="/home/fabio/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/fabio/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/fabio/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/snap/go/current"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/snap/go/current/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20.6"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/fabio/projects/playground/hello/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build332917642=/tmp/go-build -gno-record-gcc-switches"
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce with `bud create hello`, `bud run`, and `bud new controller home:/ index` on the reported Ubuntu/Snap Go setup. Start with the generated `bud/cmd/app/main.go`, `bud/internal/web/web.go`, and `bud/internal/web/controller/controller.go` paths and the `framework/controller` load failure. Done means the browser refresh completes and the dev server can restart without the module-directory error.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.