douhuang5331 2019-08-22 15:49
浏览 81
已采纳

Heroku go buildpack:找不到我创建的模块的导入路径

I'm trying to deploy a Go web app to Heroku using this template and this guide. Working great locally, but when I try to deploy with

git push heroku master

I get this error:

remote: Parsing meta tags from https://github.com?go-get=1 (status code 200)
remote: can't load package: package github.com/f4ww4z/sipss: unknown import path "github.com/f4ww4z/sipss": cannot find module providing package github.com/f4ww4z/sipss
remote:  !     Push rejected, failed to compile Go app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !       Push rejected to sipss.
remote: 
To https://git.heroku.com/sipss.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/sipss.git'

Full log after the deployment command is here.

I see that heroku's actually detected the module github.com/f4ww4z/sipss in the go.mod file (see log link), so why is it throwing this cannot find module providing package github.com/f4ww4z/sipss ?

  • 写回答

1条回答 默认 最新

  • du5739 2019-08-22 15:57
    关注

    Looks like your git repo is private. Read this https://github.com/heroku/heroku-buildpack-go#private-git-repos

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 plotBAPC画图出错
  • ¥30 关于#opencv#的问题:使用大疆无人机拍摄水稻田间图像,拼接成tif图片,用什么方法可以识别并框选出水稻作物行
  • ¥15 Python卡尔曼滤波融合
  • ¥20 iOS绕地区网络检测
  • ¥15 python验证码滑块图像识别
  • ¥15 根据背景及设计要求撰写设计报告
  • ¥20 能提供一下思路或者代码吗
  • ¥15 用twincat控制!
  • ¥15 请问一下这个运行结果是怎么来的
  • ¥15 单通道放大电路的工作原理