Encountering a formidable plugin error within Nextjs 13 #936
Unanswered
DoIevenLift
asked this question in
Q&A
Replies: 1 comment
-
@DoIevenLift you have to disable Next's body parser. We need "clean body", eg. not preprocessed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am getting this error when using formidable with nextjs13 ts:
Critical dependency: the request of a dependency is an expression // error Import trace for requested module: ./node_modules/formidable/src/Formidable.js ./node_modules/formidable/src/index.js ./app/api/rest/file/route.ts error - Error: Cannot find module 'C:\Users\jacob\Documents\GitHub\pim-nextjs-ts\yakpim\.next\server\app\api\rest\file\plugins\octetstream.js'
This is the code block:
export async function POST(request: NextApiRequest, response: NextApiResponse) { console.log("success"); // this works const form = formidable({ multiples: true }); // this triggers the error
I have tried yarn update, yarn remove and yarn add again. No fix on the error.
In the node_modules > formidable folder I can see that the octetstream is added as the plugin.
Any suggestions on ways to fix?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions