-
Notifications
You must be signed in to change notification settings - Fork 130
Open
Labels
Description
Describe the bug
Node.js version: 18.12.0
OS version: docker node:18.12.0-bullseye
Description:
Documentation says that unparsed body can be accessed with const unparsed = require('koa-body/unparsed.js');. But it throws an error instead.
Actual behavior
MODULE_NOT_FOUND : Cannot find module 'koa-body/unparsed.js'
Expected behavior
It should require the unparsed script
Code to reproduce
const unparsed = require('koa-body/unparsed.js');
Fix suggestion
Maybe it is not the best fix, but it is possible to require the file by changing the path:
const unparsed = require('koa-body/lib/unparsed.js').default;
If it is a viable solution, README.md should be updated to reflect this.
Checklist
- I have searched through GitHub issues for similar issues.
- I have completely read through the README and documentation.
- I have tested my code with the latest version of Node.js and this package and confirmed it is still not working.
changchanghwang, wendelsantosd, cedx, ElizabethCF01 and melohagan