Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Cannot build with middleware and target: serverless #2477

Open
revmischa opened this issue Aug 13, 2022 · 3 comments
Open

Cannot build with middleware and target: serverless #2477

revmischa opened this issue Aug 13, 2022 · 3 comments

Comments

@revmischa
Copy link

I don't know if this is a serverless-next issue but this warning has become an error for me in the latest nextjs

> Build error occurred
MiddlewareInServerlessTargetError: Next.js Middleware is not supported in the deprecated serverless target.
Please remove `target: "serverless" from your next.config.js to use Middleware.

And my next.config.mjs is empty

Originally posted by @revmischa in #2329 (comment)

@johnymanuelli
Copy link

Bump.

@mr-rpl
Copy link

mr-rpl commented Oct 12, 2022

+1

@revmischa
Copy link
Author

I'm working on a new setup that will solve this: https://github.com/jetbridge/cdk-nextjs

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants