eta-dev / eta

Embedded JS template engine for Node, Deno, and the browser. Lighweight, fast, and pluggable. Written in TypeScript

Home Page:https://eta.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fastify view integration not working

dnohr opened this issue · comments

commented

Describe the bug

Hi,

Thanks for working on eta!

I tried updating to the latest ETA version (3.0.1), but unfortunately, the Fastify view integration stopped working.

I encountered an error message that says:
{"statusCode":500,"error":"Internal Server Error","message":"engine.configure is not a function"}

I'm not entirely sure about the underlying cause of this issue, as it was functioning properly in the previous version.

If you have any insights or suggestions on how to resolve this, I would appreciate your feedback.

Thank you.

To Reproduce

fastify.register(require('@fastify/view'), {
	engine: { eta: require('eta') }
});

Expected behavior

It should initiate the Fastify view integration, I suppose.

Package & Environment Details
Node: 20.3.0
fastify: 4.18.0
fastify/view: 7.4.1
eta: 3.0.1

@dnohr thanks for pointing this out! Since this isn't a problem with eta itself, will you open an issue in https://github.com/fastify/point-of-view?

Thanks!

Same problem here, with express.js, type mismatch

image

"express": "^4.18.2",
"typescript": "^5.1.3",
"eta": "^3.0.1",

@SamuelGaona eta version 3 doesn't support Express.js out-of-the-box. Here's a guide on how to use it:

https://eta.js.org/docs/resources/express