Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nuxt
SDK Version
8.43.0
Framework Version
Nuxt 3.14.1592
Link to Sentry event
No response
Reproduction Example/SDK Setup
We're trying to deploy an app on Cloudflare Pages and Vercel. However, we are unable to get though the build step, local fails as well.
Project config
nuxt.config.ts
modules: [
'@sentry/nuxt/module',
]
sourcemap: {
server: true,
client: true,
},
sentry: {
sourceMapsUploadOptions: {
sourcemaps: {
filesToDeleteAfterUpload: ['.*/**/*.map'],
},
},
},
nitro: {
preset: 'cloudflare_pages',
rollupConfig: {
output: {
sourcemap: 'hidden',
},
},
},
runtimeConfig: {
public: {
sentry: {
dsn: '',
environment: '',
},
},
}
sentry.client.config.ts
import * as Sentry from '@sentry/nuxt'
Sentry.init({
dsn: useRuntimeConfig().public.sentry.dsn,
environment: useRuntimeConfig().public.sentry.environment,
tracesSampleRate: 1.0,
})
sentry.server.config.ts
import * as Sentry from '@sentry/nuxt'
import dotenv from '@dotenvx/dotenvx'
dotenv.config()
Sentry.init({
dsn: process.env.NUXT_PUBLIC_SENTRY_DSN,
environment: process.env.NUXT_PUBLIC_SENTRY_ENVIRONMENT,
tracesSampleRate: 1.0,
})
Steps to Reproduce
We are unable to reproduce this issue on an isolated project, however the issue happens on a multiple projects of ours. What troubleshooting should we do to provide more information?
Expected Result
The project is built and deployed.
Actual Result
Cloudflare Pages:
17:49:57.540 | [error] [sentry-rollup-plugin] Info: Successfully uploaded source maps to Sentry
17:49:57.561 | [error] Cannot find package '@sentry-internal/nitro-utils' imported from /opt/buildhome/repo/node_modules/.cache/nuxt/.nuxt/prerender/index.mjs
17:49:57.561 | at new NodeError (node:internal/errors:405:5)
17:49:57.561 | at packageResolve (node:internal/modules/esm/resolve:887:9)
17:49:57.561 | at moduleResolve (node:internal/modules/esm/resolve:936:20)
17:49:57.561 | at defaultResolve (node:internal/modules/esm/resolve:1129:11)
17:49:57.561 | at nextResolve (node:internal/modules/esm/loader:163:28)
17:49:57.561 | at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)
17:49:57.562 | at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
17:49:57.562 | at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:77:40)
17:49:57.562 | at link (node:internal/modules/esm/module_job:76:36)
17:49:57.562 |
17:49:57.562 | [error] Cannot find package '@sentry-internal/nitro-utils' imported from /opt/buildhome/repo/node_modules/.cache/nuxt/.nuxt/prerender/index.mjs
17:49:57.664 | Failed: Error while executing user command. Exited with error code: 1
17:49:57.674 | Failed: build command exited with code: 1
17:49:59.013 | Failed: error occurred while running build comma
Metadata
Metadata
Assignees
Type
Projects
Status
No status