fastify / point-of-view

Template rendering plugin for Fastify
MIT License
338 stars 86 forks source link

version issue #321

Closed Afnanksalal closed 2 years ago

Afnanksalal commented 2 years ago

Prerequisites

Fastify version

3.x.x

Plugin version

No response

Node.js version

16.4

Operating system

Linux

Operating system version (i.e. 20.04, 11.3, 10)

21.04

Description

im getting a version error fastify-plugin: point-of-view - expected '4.x' fastify version, '3.29.0' is installed if im correct fastify v4 is not launched

Steps to Reproduce

const fastify = require("fastify")();

fastify.register(require("point-of-view"), { engine: { ejs: require("ejs"), }, });

fastify.get("/", (req, reply) => { reply.view("/templates/index.ejs", { text: "text" }); });

fastify.listen(3000, (err) => { if (err) throw err; console.log(server listening on ${fastify.server.address().port}); });

Expected Behavior

in the docs of point-of-view it is said to use fastify v2 or above so i think v3 should be working too