Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants