nestifyjs / cookie

Library for convenient and dynamic cookies management for NestJS
MIT License
1 stars 0 forks source link

Fastify install is required despite Express as the selected platform #3

Open KerryRitter opened 4 years ago

KerryRitter commented 4 years ago

I installed and setup as specified, but got the following error on start:

node_modules/@nestifyjs/cookie/lib/interceptors/fastify-cookie.interceptor.d.ts:4:26 - error TS2307: Cannot find module 'fastify' or its corresponding type declarations.

4 import * as fastify from 'fastify';
                           ~~~~~~~~~
node_modules/@nestifyjs/cookie/lib/interceptors/fastify-cookie.interceptor.d.ts:5:46 - error TS2307: Cannot find module 'fastify' or its corresponding type declarations.

5 import { FastifyReply, FastifyRequest } from 'fastify';
                                               ~~~~~~~~~

I installed fastify as a dev dependency to get the compilation to work, but was splattered with warnings (due to a version mismatch I assume).

kayun commented 4 years ago

Hello! Thanks for sharing the problem!

What version of nestjs did you use? I just checked on version 6 and everything works fine there. Express platform works correctly, without the need to install a Fastify. There are also no warnings on the Fastify platform.

I will be glad to solve the problem, Artem.

KerryRitter commented 4 years ago

I am on a fresh install of Nest 7, latest CLI and framework.

kayun commented 4 years ago

It seems that the problems are really in the new version of nestjs. I will try to deal with this problem at the weekend.

KerryRitter commented 4 years ago

Awesome! Thank you for your efforts :) I'm using cookie-parser for now, but I'll circle back whenever you get time to push a fix. Much appreciated.