Unexpected any. Specify a different type.
Unanswered
Northeast Congo Lion posted this in #help-forum
Northeast Congo LionOP
import {getRequestConfig} from 'next-intl/server';
import {routing} from './routing';
export default getRequestConfig(async ({requestLocale}) => {
// This typically corresponds to the `[locale]` segment
let locale = await requestLocale;
// Ensure that the incoming `locale` is valid
if (!locale || !routing.locales.includes(locale as any)) {
locale = routing.defaultLocale;
}
return {
locale,
messages: (
await (locale === 'en'
? // When using Turbopack, this will enable HMR for `en`
import('../../messages/en.json')
: import(`../../messages/${locale}.json`))
).default
};
});
i get this error at using any, i checked most of the guides and it only includes any when i try to change it to something else like unknown my entire folder structure gets error since i handled the transtlation with "any", it runs fine on locally but when deployed on vercel it fails the deploying part and returns error1 Reply
Northeast Congo LionOP
it is my first project and i kinda went in blindly first i didnt implement it with route just using hook translation and used to translate, but now i migrated to app router with i18n routing