added these lines of code in my handler.js
to solve the issue.
const configPath = path.join(process.cwd(),'standalone/.next/required-server-files.json');
const config = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
const nextConfig = JSON.stringify(config?.config);
process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = nextConfig;