retail-demo-store
retail-demo-store copied to clipboard
build/stage fails for retaildemostore-lambda-load-products for Go v.1.16 and above
Starting with Go v.1.16, Module-aware mode is enabled by default. More details about the Go changes can be found here.
Even after running the specified go get commands, this change causes the build command GOARCH=amd64 GOOS=linux go build ../src/main.go located in stage.sh to fail with the following error, when using any version starting with 1.16.
../src/main.go:15:2: no required module provides package github.com/aws/aws-lambda-go/cfn: go.mod file not found in current directory or any parent directory; see 'go help modules'
../src/main.go:16:2: no required module provides package github.com/aws/aws-lambda-go/lambda: go.mod file not found in current directory or any parent directory; see 'go help modules'
../src/main.go:17:2: no required module provides package github.com/aws/aws-sdk-go/aws: go.mod file not found in current directory or any parent directory; see 'go help modules'
../src/main.go:18:2: no required module provides package github.com/aws/aws-sdk-go/aws/session: go.mod file not found in current directory or any parent directory; see 'go help modules'
../src/main.go:19:2: no required module provides package github.com/aws/aws-sdk-go/service/dynamodb: go.mod file not found in current directory or any parent directory; see 'go help modules'
../src/main.go:20:2: no required module provides package github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute: go.mod file not found in current directory or any parent directory; see 'go help modules'
../src/main.go:21:2: no required module provides package github.com/aws/aws-sdk-go/service/s3: go.mod file not found in current directory or any parent directory; see 'go help modules'
../src/main.go:22:2: no required module provides package github.com/aws/aws-sdk-go/service/s3/s3manager: go.mod file not found in current directory or any parent directory; see 'go help modules'
../src/main.go:23:2: no required module provides package gopkg.in/yaml.v2: go.mod file not found in current directory or any parent directory; see 'go help modules'