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

render: template * does not exist #186

Open
MNouriWork opened this issue Jul 13, 2022 · 2 comments
Open

render: template * does not exist #186

MNouriWork opened this issue Jul 13, 2022 · 2 comments

Comments

@MNouriWork
Copy link

Hi, I got this message:
image

and this is my code:
image

and I have imported these 2 packages:

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/amber"

Am I doing something wrong?

@SharkFourSix
Copy link
Contributor

You are lucky that I have been dealing with the same issue and just came across yours. First thing you need to know is that documentation is very very very very poor and doesn't cover all the use cases, so you have to spend time debugging the damn framework, which can be very infuriating because it's supposed to have already been tested.

Fiber doesn't do a good job when it comes to handling the errors reported by the template engines. When fiber starts up, it tries to preload the templates in memory and when it encounters an error, the rest of the templates will not get loaded as fiber will promptly stop loading the templates, and as such, they will not be found when you want to render.

So, make sure that your daily.amber doesn't have errors that may cause the file to be skipped.

You can start by sharing the contents of daily.amber

@MNouriWork
Copy link
Author

MNouriWork commented Jul 16, 2022

actually, I switched my template engine to the Jet template engine and my project worked!

and thank you for your response.

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

2 participants