Skip to content

[fix] @6.0.0 koaBody is not a function #215

@risu-p

Description

@risu-p

Describe the bug

Node.js version: v16.14.2
Description: @6.0.0 koaBody is not a function

Actual behavior

after install [email protected], get error: koaBody is not a function
back to [email protected] everything is fine

Expected behavior

need a doc for @6.0.0 😊

Code to reproduce

const Router = require("koa-router");
const koaBody = require('koa-body');

const router = new Router();

router.post(
    "xxx", 
    koaBody({
        multipart: true,
        formidable: {
            multiples: false,
            maxFieldsSize: 10*1024*1024,
        },
    }), 
    async (ctx) => {
        ...
    }
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions