Skip to content

Sentry is working on my local but not on production deployed in vercel #6265

Description

@roblegaspi

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/nextjs

SDK Version

7.21.0

Framework Version

@sentry/nextjs

Link to Sentry event

No response

Steps to Reproduce

  1. intrall @sentry/nextjs
  2. create page with getServerSideProps
  3. deploy app to vercel

Expected Result

The page to load with no issue

Actual Result

Uploading image.png…

[GET] /login
11:31:32:81
Function Status:
None
Edge Status:
500
Duration:
111.82 ms
Init Duration:
N/A
Memory Used:
60 MB
ID:
sin1::gzk9v-1669174293167-9e37795d4ec1
User Agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36
2022-11-23T03:31:33.051Z e96e7e5e-5f9e-41f6-a3c6-11fa309c3416 ERROR Error: Cannot find module './config/withSentryConfig.js'
Require stack:

  • /var/task/node_modules/@sentry/nextjs/cjs/index.server.js
  • /var/task/.next/server/pages/_document.js
  • /var/task/node_modules/next/dist/server/require.js
  • /var/task/node_modules/next/dist/server/next-server.js
  • /var/task/___next_launcher.cjs
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.mod._resolveFilename (/var/task/node_modules/next/dist/build/webpack/require-hook.js:27:32)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object. (/var/task/node_modules/@sentry/nextjs/cjs/index.server.js:19:26)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/var/task/node_modules/@sentry/nextjs/cjs/index.server.js',
    '/var/task/.next/server/pages/_document.js',
    '/var/task/node_modules/next/dist/server/require.js',
    '/var/task/node_modules/next/dist/server/next-server.js',
    '/var/task/___next_launcher.cjs'
    ],
    page: '/login'
    }
    RequestId: e96e7e5e-5f9e-41f6-a3c6-11fa309c3416 Error: Runtime exited with error: exit status 1
    Runtime.ExitError

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions