Closed Vilayat-Ali closed 3 weeks ago
The app fails to bootstrap and run.
https://github.com/Vilayat-Ali/eagle-nest/tree/problematic
ejs
@fastify/view
add this to main.ts file
app.setViewEngine({ engine: { ejs, }, templates: join(__dirname, 'templates'), })
And when using it for a controller like this
// lib import { Controller, Get, Render } from "@nestjs/common"; @Controller("/admin") export class AccountController { @Get("/login") @Render("home.ejs") login() { return {}; } }
and on running bun start:dev
bun start:dev
The error
/mnt/projects/open-source/eagle-nest/node_modules/@nestjs/platform-fastify/node_modules/fastify/lib/pluginUtils.js:125 throw new FST_ERR_PLUGIN_VERSION_MISMATCH(meta.name, requiredVersion, this.version) ^ FastifyError [Error]: fastify-plugin: @fastify/view - expected '5.x' fastify version, '4.28.1' is installed at Object.checkVersion (/mnt/projects/open-source/eagle-nest/node_modules/@nestjs/platform-fastify/node_modules/fastify/lib/pluginUtils.js:125:11) at Object.registerPlugin (/mnt/projects/open-source/eagle-nest/node_modules/@nestjs/platform-fastify/node_modules/fastify/lib/pluginUtils.js:148:16) at Boot.override (/mnt/projects/open-source/eagle-nest/node_modules/@nestjs/platform-fastify/node_modules/fastify/lib/pluginOverride.js:28:57) at Boot._loadPlugin (/mnt/projects/open-source/eagle-nest/node_modules/@nestjs/platform-fastify/node_modules/fastify/node_modules/avvio/boot.js:425:25) at process.processTicksAndRejections (node:internal/process/task_queues:90:21) { code: 'FST_ERR_PLUGIN_VERSION_MISMATCH', statusCode: 500 }
It should have no issues (atleast when running the application)
10.4.5
10.4.6
Using bun instead (Bun v1.1.34)
I am using bun (version: 1.1.34)
What if you use @fastify/view v8 instead?
Just use the compatible @fastify/view version.
Is there an existing issue for this?
Current behavior
The app fails to bootstrap and run.
Minimum reproduction code
https://github.com/Vilayat-Ali/eagle-nest/tree/problematic
Steps to reproduce
ejs
,@fastify/view
add this to main.ts file
And when using it for a controller like this
and on running
bun start:dev
The error
Expected behavior
It should have no issues (atleast when running the application)
Package version
10.4.5
NestJS version
10.4.6
Node.js version
Using bun instead (Bun v1.1.34)
In which operating systems have you tested?
Other
I am using bun (version: 1.1.34)