-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Milestone
Description
- Review the documentation: https://docs.sentry.io/
- Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
- Use the latest release: https://github.com/getsentry/sentry-javascript/releases
- Provide a link to the affected event from your Sentry account
Package + Version
-
@sentry/browser
-
@sentry/node
-
raven-js
-
raven-node
(raven for node) - other:
@sentry/webpack-plugin
Version:
`@sentry/browser` - 6.13.0
`@sentry/webpack-plugin` - 1.17.1
Description
I am using Sentry with a NextJS project. For various reasons, we're still using NextJS v10 and webpack v4 in our project. When upgrading from 6.12.0 to 6.13.0 or 6.13.1, we're getting ReferenceError: document is not defined
in Sentry.init()
both in development mode and when building.
Here's the full trace:
ReferenceError: document is not defined
at FetchTransport.BaseTransport (/home/casted/src/app/node_modules/@sentry/browser/dist/transports/base.js:25:47)
at new FetchTransport (/home/casted/src/app/node_modules/@sentry/browser/dist/transports/fetch.js:78:28)
at BrowserBackend._setupTransport (/home/casted/src/app/node_modules/@sentry/browser/dist/backend.js:43:20)
at BrowserBackend.BaseBackend (/home/casted/src/app/node_modules/@sentry/core/dist/basebackend.js:15:32)
at new BrowserBackend (/home/casted/src/app/node_modules/@sentry/browser/dist/backend.js:15:42)
at BrowserClient.BaseClient (/home/casted/src/app/node_modules/@sentry/core/dist/baseclient.js:52:25)
at new BrowserClient (/home/casted/src/app/node_modules/@sentry/browser/dist/client.js:35:24)
at Object.initAndBind (/home/casted/src/app/node_modules/@sentry/core/dist/sdk.js:18:18)
at Object.init (/home/casted/src/app/node_modules/@sentry/browser/dist/sdk.js:93:12)
at Module.1TCz (/home/casted/src/app/.next/server/pages/_app.js:125:53)
at __webpack_require__ (/home/casted/src/app/.next/server/pages/_app.js:23:31)
at Object.0 (/home/casted/src/app/.next/server/pages/_app.js:99:18)
at __webpack_require__ (/home/casted/src/app/.next/server/pages/_app.js:23:31)
at /home/casted/src/app/.next/server/pages/_app.js:91:18
at Object.<anonymous> (/home/casted/src/app/.next/server/pages/_app.js:94:10)
at Module._compile (internal/modules/cjs/loader.js:999:30)
ninjinkun and yakovkhalinsky
Metadata
Metadata
Assignees
Labels
No labels