Skip to content

TypeError: ctx.i18n[(SET_PREFIX + key)] is not a function #20

@snowdream

Description

@snowdream
"koa-i18n": "2.1.0",

browse:
http://localhost:3000/download/view?filePath=20220406/3_mP8fZGCY.jpg

  TypeError: ctx.i18n[(SET_PREFIX + key)] is not a function
      at D:\workspace\nodejs\project\project-backend\node_modules\koa-i18n\index.js:107:59
      at Array.some (<anonymous>)
      at i18nMiddleware (D:\workspace\nodejs\project\project-backend\node_modules\koa-i18n\index.js:104:24)
      at dispatch (D:\workspace\nodejs\project\project-backend\node_modules\koa-compose\index.js:42:32)
      at session (D:\workspace\nodejs\project\project-backend\node_modules\koa-session\index.js:41:13)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async bodyParser (D:\workspace\nodejs\project\project-backend\node_modules\koa-bodyparser\index.js:91:5)
      at async cors (D:\workspace\nodejs\project\project-backend\node_modules\@koa\cors\index.js:108:16)
      at async compressMiddleware (D:\workspace\nodejs\project\project-backend\node_modules\koa-compress\lib\index.js:52:5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions