Deployment Fails with @sentry/nuxt on Cloudflare Pages

For Workes & Pages, what is the name of the domain?

ladder.social

What is the error message?

2024-11-17T11:44:01.460974Z The package “url” wasn’t found on the file system but is built into node. 2024-11-17T11:44:01.461029Z Add the “nodejs_compat” compatibility flag to your Pages project and make sure to prefix the module name with “node:” to enable Node.js compatibility.

What is the issue or error you’re encountering

I’m encountering an issue deploying a Nuxt 3 application on Cloudflare Pages after adding the @sentry/nuxt package. The local build completes successfully, but all deployments fail when the package is included.

What steps have you taken to resolve the issue?

Removing @sentry/nuxt resolves the issue, and deployments succeed again.
I’ve ensured the compatibility mode flag is set, as recommended in the error message.
The issue persists even with compatibility mode enabled.