使用Heroku进行部署

huangapple go评论75阅读模式
英文:

GO with Heroku Deployments

问题

你好,我目前在使用Heroku时遇到了一个问题!它可以找到我所有的依赖项,直到出现以下错误:

构建项目:无法加载io/fs:找不到提供io/fs包的模块

我在我的GitHub仓库中有vendor目录,但它就是无法构建。

英文:

Hello i am currently running into a problem with using Heroku! It finds all my dependency's until

build project: cannot load io/fs: cannot find module providing package io/fs

I have the vendor directory on my github repo but it just wont build?

答案1

得分: 1

在Heroku上,进入你的项目,点击设置(Settings),然后选择构建包(Buildpacks),添加 'heroku/go'。

然后在任意终端中执行以下命令:

heroku config:set GOVERSION=1.16

英文:

On heroku -> your project -> Settings -> Buildpacks, and add 'heroku/go'.

Then execute in any terminal:

> heroku config:set GOVERSION=1.16

huangapple
  • 本文由 发表于 2022年1月9日 05:51:43
  • 转载请务必保留本文链接:https://go.coder-hub.com/70636738.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定