Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

392
Views
'next-connect' error (nextConnect is undefined)

I am trying to integrate 'next-connect' into my Nextjs app in order to use multer inside of my middleware. I cannot import multer using the Nextjs built-in middleware feature (the one where you create a separate 'middleware.js' file). However, when I try to follow the documentation by importing 'next-connect' with import nextConnect from 'next-connect';, it says that nextConnect is undefined. 'next-connect' version is '1.0.0-next.2' and 'next' is the latest version. Inside 'pages/api/test.js':

import nextConnect from 'next-connect';

const apiRoute = nextConnect().post(req, res) => {
   res.status(200).json({ data: 'success' });
});
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!