toonvanstrijp / nestjs-i18n

The i18n module for nestjs.
https://nestjs-i18n.com
Other
627 stars 101 forks source link

type safety file generation #527

Closed lakshmankashyap closed 10 months ago

lakshmankashyap commented 11 months ago

Describe the bug

generated file in wrong way I18nModule.forRoot({ fallbackLanguage: 'en', loaderOptions: { path: path.join(dirname, '/i18n/'), watch: true, }, resolvers: [{ use: QueryResolver, options: ['lang'] }, AcceptLanguageResolver, new HeaderResolver(['x-lang'])], typesOutputPath: path.join(dirname, '../generated/i18n.generated.ts'), }),

i18n.generated.ts' / DO NOT EDIT, file generated by nestjs-i18n /

import "nestjs-i18n" from ; export type <> = ; export type <> = ;

Reproduction

npm run start

System Info

System:
    OS: Linux 5.19 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (16) x64 AMD Ryzen 7 5700U with Radeon Graphics
    Memory: 5.65 GB / 14.97 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 16.18.1 - ~/.nvm/versions/node/v16.18.1/bin/node
    npm: 8.19.2 - ~/.nvm/versions/node/v16.18.1/bin/npm
  Browsers:
    Chrome: 115.0.5790.170

Used Package Manager

npm

Validations

LuckyArdhika commented 10 months ago

same problem

rubiin commented 10 months ago

Please provide a minimum repro https://stackoverflow.com/help/minimal-reproducible-example

hendrikbursian commented 10 months ago

You need to upgrade typescript as mentioned here: https://github.com/toonvanstrijp/nestjs-i18n/issues/468#issuecomment-1437032639

rubiin commented 10 months ago

closing in favor of #468 (comment)