Skip to content

Commit 5a2460b

Browse files
yethikrishnaclaude
andcommitted
fix: resolve Vercel ENOENT for @opentelemetry/api during output tracing
Replace serverExternalPackages (which forces Vercel to trace the file at /vercel/node_modules/) with outputFileTracingExcludes to skip @opentelemetry packages entirely in the monorepo build. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1561bf4 commit 5a2460b

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎web/next.config.mjs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ const nextConfig = {
2323
},
2424
allowedDevOrigins: DEV_ALLOWED_ORIGINS,
2525

26-
// Externalize packages that cause ENOENT during Vercel output tracing
27-
serverExternalPackages: ['@opentelemetry/api'],
28-
2926
// Enable experimental features for better SSG performance
3027
experimental: {
3128
optimizePackageImports: ['@/components/ui'],
29+
// Exclude @opentelemetry/api from output tracing to avoid ENOENT in monorepo
30+
outputFileTracingExcludes: {
31+
'*': ['@opentelemetry/*'],
32+
},
3233
},
3334
webpack: (config) => {
3435
config.resolve.fallback = { fs: false, net: false, tls: false, path: false }

0 commit comments

Comments
 (0)