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

nextjs with app router is not working #4

Open
learncodingforweb opened this issue Jun 25, 2023 · 5 comments
Open

nextjs with app router is not working #4

learncodingforweb opened this issue Jun 25, 2023 · 5 comments
Assignees

Comments

@learncodingforweb
Copy link

If i replace nextjs frontend folder with newly create app

✔ What is your project named? … frontend
✔ Would you like to use TypeScript with this project? … No / Yes
✔ Would you like to use ESLint with this project? … No / Yes
✔ Would you like to use Tailwind CSS with this project? … No / Yes
✔ Would you like to use `src/` directory with this project? … No / Yes
✔ Use App Router (recommended)? … No / Yes
✔ Would you like to customize the default import alias? … No / Yes
✔ What import alias would you like configured? … @/*
Creating a new Next.js app in /home/camera/dev/concept/frontend.

next_app_static_site

On navigate to About page url, getting unable to finish request: StatusCodes not supported: 404 - Not Found

But if app create without App router then, it it working fine.

Can you resolve issue with nextjs app using App Router?

@LGiki
Copy link
Owner

LGiki commented Jun 28, 2023

Thank you for reporting, but I am unable to reproduce your issue. I will update this project to the latest NextJS and use the app router. I am quite busy moving house at the moment so will get to it as soon as possible.

@LGiki LGiki self-assigned this Jun 28, 2023
@learncodingforweb
Copy link
Author

learncodingforweb commented Jun 28, 2023

I am providing complete example code https://github.com/learncodingforweb/wails_next_app_router . Note it is working in development mode. But when app is build, after that running app and on navigate to about page, getting error StatusCodes not supported: 404 - Not Found. Please update solution so that app can be run in production mode.

@LGiki
Copy link
Owner

LGiki commented Jun 29, 2023

What operating system are you using? I tested it on both Linux and Windows, and everything was fine on Windows, but I ran into the same issue on Linux. I suspect it's an upstream problem. Wails uses libwebkit as the web container on Linux, and it often encounters some strange issues. I'll continue to investigate this problem.
Screenshot from 2023-06-29 15-22-31

Screenshot from 2023-06-29 15-24-23

@LGiki
Copy link
Owner

LGiki commented Jun 29, 2023

I found that on Linux, when clicking the link to jump to the about page, the request was /a instead of /about, so it returned a 404 Not Found, and I do not know why this happened, recommend temporarily using pages router for now.

@learncodingforweb
Copy link
Author

I am running on ubuntu22.04 LTS

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