nofx icon indicating copy to clipboard operation
nofx copied to clipboard

[BUG] [Solution] Installation error (missing go.sum entry)

Open ggdorman opened this issue 1 year ago • 1 comments

🐛 Bug Description

When installing using the start.sh script as per documentation, I got an error (see below).

📋 Steps to Reproduce

  1. git clone repo
  2. sudo ./start.sh start --build
  3. Wait for it to work...
  4. 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.

ggdorman avatar Nov 02 '25 20:11 ggdorman

Re-produced. Should fix this comple issue.

tangmengqiu avatar Nov 02 '25 22:11 tangmengqiu