这是我的项目结构:这是我的模组文件:module github.com/bloodcompany/blood-microservices/stores/sync-stores-google-sheet-to-firestorego 1.16require ( cloud.google.com/go/firestore v1.6.1 // indirect cloud.google.com/go/kms v1.4.0 // indirect github.com/bloodcompany/blood-microservices/utils v1.0.0)replace ( github.com/bloodcompany/blood-microservices/models => ../../models github.com/bloodcompany/blood-microservices/utils => ../../utils)这是我在“function.go”文件中的导入:import ( "github.com/bloodcompany/blood-microservices/utils")问题: 当我将函数部署到服务器时,终端出现以下错误。你可以在我的项目结构中看到,错误中似乎缺少的包在 Vendor Tree 下已经可用。但错误仍然出现。可能出了什么问题?ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: src/stores/function.go:9:2: cannot find package "github.com/bloodcompany/blood-microservices/utils" in any of: /workspace/src/stores/vendor/github.com/bloodcompany/blood-microservices/utils (vendor tree) /layers/google.go.runtime/go/src/github.com/bloodcompany/blood-microservices/utils (from $GOROOT) /workspace/src/github.com/bloodcompany/blood-microservices/utils (from $GOPATH); Error ID: 2f5e35a0注意: 我的项目不在$GOPATH这个位置。这是一个问题吗?$GOPATH 位置是“C:\Users\thisa\go”,而项目在另一个位置。
- 1 回答
- 0 关注
- 75 浏览
添加回答
举报
0/150
提交
取消