Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Existing project fails to build with recent CLI versions #666

@fgsch

Description

@fgsch

Version

Fastly CLI version v4.0.1 (cc0afc7)
Built with go version go1.18.6 linux/amd64
Viceroy version: viceroy 0.2.15

What happened

Recent CLI versions expect the go.mod file to be in the same directory as the fastly.toml file.
This was not the case until recently, and downgrading to e.g., 3.2.5 makes the project build again.

The error with recent versions:

$ fastly compute build  --non-interactive
Initializing...
Verifying package manifest...
Verifying local go toolchain...

ERROR: go.mod not found.

To fix this error, run the following command:

	$ go mod init

Then execute:

	$ fastly compute build

The repo structure:

.
├── go.mod
├── go.sum
├── service
│   └── main.go
│   └── fastly.toml
├── somepkg
│   └── somefile.go
│   └── someotherfile.go

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions