You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What operating system, Node.js, and npm version?
pnpm: 8.8.0
node: 20.7.0
Windows 10
What happened?
I have built my application not to utilize the Internationalization (i18n) Routing rather using the queryParam from next-translate.
Everything works as expected, but I get this error and similar on the Node-server. I don't want or need the api to be prefixed with locale. Or any page for that matter.
Failed to write image to cache /en-US/api/health [Error: ENOENT: no such file or directory, mkdir '/app/.next/server/app/en-US'] {errno: -2,code: 'ENOENT',syscall: 'mkdir',path: '/app/.next/server/app/en-US'}
What did you expect to happen?
That it should not add the prefix to the URL.
To have a setting or way to opt-out of automatic adding the locale to the URL.
Are you willing to submit a pull request to fix this bug?
I would but, my knowlage on this very limited
module.exports = {
locales: ['en-US', 'da-DK', 'fi-FI', 'sv-SE', 'nb-NO', 'de-DE'],
defaultLocale: 'en-US',
pages: {
'*': ['common'],
'/(main-app)': ['home'],
'/(main-app)/Overview': ['overview'],
},
logBuild: false,
loadLocaleFrom: (lang, ns) =>
// You can use a dynamic import, fetch, whatever. You should
// return a Promise with the JSON file.
// Needed because standard notation for culture is e.g. en instead of en-US
import(`./locales/${lang}/${ns}.json`).then((m) => m.default),
};
What version of this package are you using?
2.6.0
What operating system, Node.js, and npm version?
pnpm: 8.8.0
node: 20.7.0
Windows 10
What happened?
I have built my application not to utilize the Internationalization (i18n) Routing rather using the queryParam from next-translate.
Everything works as expected, but I get this error and similar on the Node-server. I don't want or need the api to be prefixed with locale. Or any page for that matter.
Failed to write image to cache /en-US/api/health [Error: ENOENT: no such file or directory, mkdir '/app/.next/server/app/en-US'] {errno: -2,code: 'ENOENT',syscall: 'mkdir',path: '/app/.next/server/app/en-US'}
What did you expect to happen?
That it should not add the prefix to the URL.
To have a setting or way to opt-out of automatic adding the locale to the URL.
Are you willing to submit a pull request to fix this bug?
I would but, my knowlage on this very limited
Folder structure
Code
middleware:
i18n:
next.config:
The text was updated successfully, but these errors were encountered: