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

Failed to compile error #52

Closed
rgbskills opened this issue May 26, 2023 · 1 comment
Closed

Failed to compile error #52

rgbskills opened this issue May 26, 2023 · 1 comment

Comments

@rgbskills
Copy link

Hello I'm using NextJS 13.4.4 and I simply copied over the files from "next13-typescript-static-pages" and I am getting the following error:

./node_modules/next-firebase-auth-edge/lib/next/middleware.js
Module parse failed: Identifier 'NextResponse' has already been declared (3:6)
| "use strict";
| const NextResponse = require("next/dist/server/web/spec-extension/response").NextResponse;
> const NextResponse = require("next/dist/server/web/spec-extension/response").NextResponse;
| const NextResponse = require("next/dist/server/web/spec-extension/response").NextResponse;
| Object.defineProperty(exports, "__esModule", {
@awinogrodzki
Copy link
Owner

Hey @rgbskills,

Thanks for reporting.

I was able to reproduce the error. It's a fault of Next.js SWC compiler rendering multiple variable declarations. The fix is coming in vercel/next.js#50376

To fix the issue you can either downgrade next to 13.4.1 or upgrade to 13.4.5-canary.0

Cheers!

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

2 participants