Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

前后端分离部署,编译后报错 panic: html/template: pattern matches no files: static/ui/index.html #10

Open
wen-gao0605 opened this issue Jun 4, 2022 · 7 comments

Comments

@wen-gao0605
Copy link

前后端分离部署,启动后端服务报错
panic: html/template: pattern matches no files: static/ui/index.html

@likai9527
Copy link

likai9527 commented Jun 8, 2022

脚本一键部署也是这个错误

@likai9527
Copy link

自己手动编译前端代码,放到static/ui 目录下,问题解决了

@coalzhao
Copy link

能不能详细的描述下,谢谢

@noovertime7
Copy link

后端代码在编译时会加载静态文件的路由,如果静态文件不存在会panic,作者考虑一下优化这个地方? @lanyulei

@lucky4yf
Copy link

自己手动编译前端代码,放到static/ui 目录下,问题解决了

你好,我按照这个方法成功启动了项目,但是发现数据库里没表和数据,可以发我一份sql文件吗

@coalzhao
Copy link

coalzhao commented Mar 21, 2023 via email

@lucky4yf
Copy link

执行初始化的时候就会新建数据库的表结构 前提是用mysql管理工具将数据库建好.

------------------ Original ------------------ From: "lanyulei/fiy" @.>; Date: Tue, Mar 21, 2023 09:08 AM @.>; @.@.>; Subject: Re: [lanyulei/fiy] 前后端分离部署,编译后报错 panic: html/template: pattern matches no files: static/ui/index.html (Issue #10) 自己手动编译前端代码,放到static/ui 目录下,问题解决了 你好,我按照这个方法成功启动了项目,但是发现数据库里没表和数据,可以发我一份sql文件吗 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

我是在本地用goland启动的,执行了install之后,发现数据库里没有初始化表和数据,但是项目启动后,页面可以访问到,验证码接口也可以调用,只是没表和数据。install也没报错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants