Closed myeljoud closed 11 months ago
Ping @QuiiBz
Hey, it may be my fault. https://github.com/QuiiBz/next-international/issues/144
Ping @medyahyejoud
Maybe it is just a matcher
issue in your middleware.ts
file?
Thanks for the reproduction. I cloned and run the app, but I don't get any error on the server nor client:
Do you have any extension in your browser that could fetch this service worker.js
file? You can try by going into private browsing.
As @gustaveWPM mentioned, you can also add serviceworker.js
inside the matcher
configuration of your middleware: https://github.com/medyahyejoud/next_reprod/blob/493d26bb1ffa4140f407f6a38ceda5004850308f/middleware.ts#L16
export const config = {
matcher: ["/((?!api|static|.*\\..*|_next|favicon.ico|robots.txt|serviceworker.js).*)"],
};
Hey guys,
Hey @QuiiBz, thanks a bunch! I totally overlooked the isolated mode for opening the app. Just like you said, the issue got sorted out—it turned out to be the localhost cache and site data, possibly from other apps running on the same port. 🙌
Describe the bug next-international keeps logging out this error:
⨯ node_modules/.pnpm/next-international@1.0.1/node_modules/next-international/dist/app/server/index.js (175:61) @ eval ⨯ TypeError: locales[locale] is not a function at Generator.next (<anonymous>) at new Promise (<anonymous>) at NotFound (./app/[locale]/not-found.tsx:20:77) at stringify (<anonymous>) null
To Reproduce here is a stripped down version fo the application to test, btw I'm using pnpm. https://github.com/medyahyejoud/next_reprod.git
Expected behavior App shouldn't log out this message, I've done everything correctly.
Screenshots
About (please complete the following information):