toonvanstrijp / nestjs-i18n

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

Error in utils when updated to latest version #556

Closed DenzelCode closed 10 months ago

DenzelCode commented 10 months ago

Describe the bug

/app/node_modules/@nestjs/common/services/console-logger.service.js:150 ? this.stringifyMessage(message(), logLevel) ^ TypeError: Cannot read properties of undefined (reading 'map') at /app/node_modules/nestjs-i18n/src/utils/util.ts:39:14 at ConsoleLogger.stringifyMessage (/app/node_modules/@nestjs/common/services/console-logger.service.js:150:37) at ConsoleLogger.formatMessage (/app/node_modules/@nestjs/common/services/console-logger.service.js:142:29) at /app/node_modules/@nestjs/common/services/console-logger.service.js:131:43 at Array.forEach () at ConsoleLogger.printMessages (/app/node_modules/@nestjs/common/services/console-logger.service.js:126:18) at ConsoleLogger.error (/app/node_modules/@nestjs/common/services/console-logger.service.js:52:14) at Logger.error (/app/node_modules/@nestjs/common/services/logger.service.js:43:29) at Logger.descriptor.value (/app/node_modules/@nestjs/common/services/logger.service.js:162:27) at ExceptionsHandler.handleUnknownError (/app/node_modules/@nestjs/core/exceptions/base-exception-filter.js:54:43)

Reproduction

When getting a DTO validation error

System Info

System:
    OS: macOS 13.5.1
    CPU: (10) x64 Apple M1 Max
    Memory: 28.34 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.19.0 - ~/.nvm/versions/node/v16.19.0/bin/node
    Yarn: 1.22.19 - ~/project/node_modules/.bin/yarn
    npm: 9.6.7 - ~/project/node_modules/.bin/npm
    Watchman: 2023.07.24.00 - /usr/local/bin/watchman
  Browsers:
    Chrome: 116.0.5845.140
    Safari: 16.6

Used Package Manager

yarn

Validations

DenzelCode commented 10 months ago

Back in version 10.2.6 this error did not existed

rubiin commented 10 months ago

I will recheck this to see if anything broke that

DenzelCode commented 10 months ago

Thank you very much!

On Tue, Sep 19, 2023 at 7:16 AM Rubin Bhandari @.***> wrote:

I will recheck this to see if anything broke that

— Reply to this email directly, view it on GitHub https://github.com/toonvanstrijp/nestjs-i18n/issues/556#issuecomment-1725303525, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGU4C6HESYFZSZBKIL4VMRDX3F5I7ANCNFSM6AAAAAA4NSOYOQ . You are receiving this because you authored the thread.Message ID: @.***>

rubiin commented 10 months ago

@DenzelCode can you provide me a minimal reproduction