Open learncodingforweb opened 1 year ago
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.
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.
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.
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.
I am running on ubuntu22.04 LTS
If i replace nextjs frontend folder with newly create app
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?