nestjs/jwt

Wrong dependency @types/jsonwebtoken

mvandenbrink opened this issue · 1 comments

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When using npm install --omit=dev there are @types installed for jsonwebtoken and node.

Minimum reproduction code

https://github.com/mvandenbrink/nestjs-jwt-issue

Steps to reproduce

  1. nest new nest-jwt-issue --strict
  2. cd .\nest-jwt-issue\
  3. npm install --save @nestjs/passport passport passport-local @nestjs/jwt passport-jwt
  4. npm install --save-dev @types/passport-local @types/passport-jwt
  5. rmdir -R node_modules
  6. npm install --omit=dev
  7. npm explain @types/node
@types/node@16.11.60
node_modules/@types/node
  dev @types/node@"^16.0.0" from the root project
  @types/node@"*" from @types/jsonwebtoken@8.5.8
  node_modules/@types/jsonwebtoken
    @types/jsonwebtoken@"8.5.8" from @nestjs/jwt@9.0.0
    node_modules/@nestjs/jwt
      @nestjs/jwt@"^9.0.0" from the root project

Expected behavior

Empty @types folder

Package version

9.0.0

NestJS version

9.1.2

Node.js version

16.16.0

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

This is the expected behavior.

Please, use our Discord channel (support) for such questions. We are using GitHub to track bugs, feature requests, and potential improvements.