Next.js build on Vercel is failing

We see two errors in the logs:

  1. Module not found:
Module not found: Can't resolve '@opentelemetry/exporter-jaeger' in '/vercel/path0/node_modules/@opentelemetry/sdk-node/build/src

'

  1. Prerendering error:
Error occurred prerendering page "/accessibility-statement"
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.


Expected behavior
The project should build successfully on Vercel, as it did in previous deployments.

Hey, @drsilentemmanuel! Welcome to the Vercel Community.

For the OpenTelemetry Error:

Either install the missing package:

npm install @opentelemetry/exporter-jaeger

or disable Jaeger tracing by adding this env var in your Vercel project:

OTEL_TRACES_EXPORTER=none

For the prerendering Error on /accessibility-statement:
Check that all components are imported/exported correctly. To debug quickly, you can disable prerendering:

export const dynamic = 'force-dynamic';

If the issue persists, could you share code for that page so we can help pinpoint the problem?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.