Hi, i use next.js i project deploy build is success . I get the following error when i enter the site
When I run the project on local computer and on vercel everything works fine but when I run it on netlify this error comes up
{"errorType":"Error","errorMessage":"Default namespace not found at /var/task/public/static/locales/en/common.json","trace":["Error: Default namespace not found at /var/task/public/static/locales/en/common.json"," at createConfig (/var/task/src/node_modules/next-i18next/dist/commonjs/config/create-config.js:117:19)"," at new NextI18Next (/var/task/src/node_modules/next-i18next/dist/commonjs/index.js:57:48)"," at Object.k7Sn (/var/task/src/netlify-automatic-functions/next_index/nextPage.js:4758:18)"," at __webpack_require__ (/var/task/src/netlify-automatic-functions/next_index/nextPage.js:23:31)"," at Module.1TCz (/var/task/src/netlify-automatic-functions/next_index/nextPage.js:301:63)"," at __webpack_require__ (/var/task/src/netlify-automatic-functions/next_index/nextPage.js:23:31)"," at Module.svS4 (/var/task/src/netlify-automatic-functions/next_index/nextPage.js:5024:22)"," at __webpack_require__ (/var/task/src/netlify-automatic-functions/next_index/nextPage.js:23:31)"," at /var/task/src/netlify-automatic-functions/next_index/nextPage.js:91:18"," at Object.<anonymous> (/var/task/src/netlify-automatic-functions/next_index/nextPage.js:94:10)"]}
this is i18n.js content:
const NextI18Next = require(“next-i18next”).default;
const { localeSubpaths } = require(“next/config”).default().publicRuntimeConfig;
const path = require(“path”);
module.exports = new NextI18Next({
otherLanguages: [“en”],
localeSubpaths,
localePath: path.resolve("./public/static/locales"),
//localePath: “public/static/locales”,
});
i18n language files folder tree:
-public > static >locales > en
-public > static >locales > de