You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Forgejo本地用go run main.go运行遇模板错误,编译后正常求原因

Forgejo源码运行go run main.go模板文件找不到问题分析

从官方文档从源码搭建Forgejo后,使用go run main.go本地运行程序,访问localhost:3000时遇到如下错误:

Unable to render status/500 page, the template system is broken, or Gitea can't find your template files.

奇怪的是,先执行go build main.go编译再运行则无此问题。网上有类似问题帖,但因我的系统未运行其他服务,其解决方案不适用。请问有人能分析该问题成因吗?

我的搭建步骤为:

npm install
go mod tidy
make clean
make frontend
make backend

完整错误日志如下:

2024/10/02 13:31:26 .../i18n/localestore.go:131:TrString() [E] Missing translation "install.install"
2024/10/02 13:31:26 .../context_response.go:91:HTML() [E] Render failed: failed to render template: install, error: asset from: , template "install" not found
2024/10/02 13:31:26 ...eb/routing/logger.go:102:func1() [I] router: completed GET / for [::1]:61953, 200 OK in 1.0ms @ install/install.go:87(install.Install)

感谢您的帮助!

PS:Stackoverflow目前无“Forgejo”标签


内容的提问来源于stack exchange,提问作者Michael Sparrow

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.17 17:04:59