nofx
nofx copied to clipboard
[BUG] [Solution] Installation error (missing go.sum entry)
🐛 Bug Description
When installing using the start.sh script as per documentation, I got an error (see below).
📋 Steps to Reproduce
- git clone repo
- sudo ./start.sh start --build
- Wait for it to work...
- See error
✅ Expected Behavior
Successful deployment
❌ Actual Behavior
Failed deployment
📸 Screenshots / Logs
=> [nofx backend-builder 5/8] COPY go.mod go.sum ./ 0.5s
=> [nofx backend-builder 6/8] RUN go mod download 105.9s
=> [nofx backend-builder 7/8] COPY . . 0.7s
=> ERROR [nofx backend-builder 8/8] RUN CGO_ENABLED=1 GOOS=linux go build -trimpath -ldflags="-s -w" -o nofx . 11.7s
------
> [nofx backend-builder 8/8] RUN CGO_ENABLED=1 GOOS=linux go build -trimpath -ldflags="-s -w" -o nofx .:
11.11 config/database.go:15:2: missing go.sum entry for module providing package github.com/mattn/go-sqlite3 (imported by nofx/config); to add:
11.11 go get nofx/config
------
Dockerfile.backend:50
--------------------
48 |
49 | COPY . .
50 | >>> RUN CGO_ENABLED=1 GOOS=linux go build -trimpath -ldflags="-s -w" -o nofx .
51 |
52 | # ──────────────────────────────────────────────────────────────
--------------------
target nofx: failed to solve: process "/bin/sh -c CGO_ENABLED=1 GOOS=linux go build -trimpath -ldflags=\"-s -w\" -o nofx ." did not complete successfully: exit code: 1
💻 Environment
- OS: latest Fedora Linux, Arch Linux
- NOFX Version/Commit: Commit 8ad737e
- Deployment Method: Docker
🔧 Additional Context
✋ Possible Solution
Running the following command solved the errors:
sudo docker run --rm -v "$PWD":/app -w /app golang:1.25-alpine sh -c "apk add --no-cache git && go get github.com/mattn/go-sqlite3&& go mod tidy"
The docker file should be updated to reflect this. Thank you for your attention.
Re-produced. Should fix this comple issue.