duanhui5344 2016-08-23 15:48
浏览 35
已采纳

“ goapp构建”有效,但“ appcfg.py更新”只是“找不到导入”……?

After updating the Google App Engine SDK last night... Both go env and goapp env have the correct GOPATH and GOROOT, go build and goapp build both work, but appcfg.py update ... returns that every third-party package is missing.

Even if I run goapp get ... or go get ... again for each package, it makes no difference since they're already in the GOPATH anyway. That alone should be confirmed by the fact that both commands build the project.

What could be wrong? :(


EDIT: It produces different errors each time I run appcfg.py update . ...

main.go:4: can't find import: "github.com/gin-gonic/gin" github.com/gin-gonic/gin/binding/default_validator.go:7: can't find import: "gopkg.in/go-playground/validator.v8" github.com/gin-gonic/gin/context.go:17: can't find import: "github.com/gin-gonic/gin/binding"

... Ran goapp get ... on all of these, even though they're already there.

main.go:4: can't find import: "github.com/gin-gonic/gin" github.com/gin-gonic/contrib/gzip/gzip.go:9: can't find import: "github.com/gin-gonic/gin" github.com/gin-gonic/gin/render/yaml.go:10: can't find import: "gopkg.in/yaml.v2"

... Repeat, run goapp get ... on all of these again.

main.go:4: can't find import: "github.com/gin-gonic/gin" github.com/gin-gonic/gin/render/yaml.go:10: can't find import: "gopkg.in/yaml.v2"

Makes no sense. The libraries are already there. I can do goapp build and it works, but I can't deploy.

All of this is inside the "--- begin server output ---" and "--- end server output ---" wrappings... is this a server-side issue?

  • 写回答

2条回答 默认 最新

  • doujiang2020 2016-08-24 01:57
    关注

    https://groups.google.com/forum/#!topic/google-appengine-go/rVHZXlSfC7E ... As noted here by another user, this is a temporary issue with Google App Engine.

    It can be solved by commenting out the main() method in the main package of your project. Normally, init() is used, so this does not currently cause any other issue except a minor inconvenience when deploying to other platforms simultaneously or building locally for non-App Engine execution.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥30 python代码,帮调试,帮帮忙吧