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 ubuntu22.04上安装ursim-3.15.8.106339遇到的问题
  • ¥15 求螺旋焊缝的图像处理
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案
  • ¥50 yalmip+Gurobi
  • ¥20 win10修改放大文本以及缩放与布局后蓝屏无法正常进入桌面
  • ¥15 itunes恢复数据最后一步发生错误
  • ¥15 关于#windows#的问题:2024年5月15日的win11更新后资源管理器没有地址栏了顶部的地址栏和文件搜索都消失了