#Error after upgraded to Next15
1 messages · Page 1 of 1 (latest)
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize
✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)
Did you try deleting the node_modules and .next folders?
<@&752637460550385834>
Don't ping mods for troubleshooting help, only for actual moderation purposes.
sorry, but its urgent
show the code you have written for useGetMyProfile
I understand the compilation error, but we need more details, my friend. Have you used a nextjs migration codemod? Can you show us the behavior of the functions that do fetch? Do you have any specific configuration in next.config.ts?
@keen locust here is useGetMyProfile
return useSWR<ResponseModel<User>>('/api/proxy/Users/GetMyProfile', fetcher, {
...dataRefreshSetting1,
keepPreviousData: true,
});
}
and the dataRefreshSetting1
export const dataRefreshSetting1 = {
errorRetryCount: 2, // Retry failed requests twice
errorRetryInterval: 10 * 1000, // Retry every 5 seconds
dedupingInterval: 1000 * 60 * 10, // Data stays fresh for 10 seconds
revalidateOnFocus: false, // Enable auto-revalidate on focus (optional)
refreshInterval: 1000 * 60 * 10, // Refresh every 10 mins
revalidateIfStale: true, //Enable auto-revalidation when stale (optional)
}
no i don't use the codeMod and here is my next.config
const isProd = process.env.NODE_ENV === 'production';
const BASE_URL_DOMAIN = process.env.BASE_URL_DOMAIN;
const nextConfig = {
reactStrictMode: true,
compiler: {
removeConsole: isProd ? { exclude: ["error"] } : false
},
env: {
API_BASE_URL: process.env.API_BASE_URL || 'https://api.yourdomain.com',
STORAGE_PASSPHRASE: process.env.STORAGE_PASSPHRASE || 'RandomPassphrase',
TOKEN: process.env.TOKEN || '',
PORT: process.env.PORT || 3000,
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '**',
port: '',
pathname: '**',
},
],
},
};
export default nextConfig;