-
Notifications
You must be signed in to change notification settings - Fork 47
Fix build error on production privy dependency #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5c3f132
91d0128
bc4315c
256a8eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -125,29 +125,23 @@ const nextConfig = { | |
| }, | ||
| }; | ||
|
|
||
| // Disable Sentry to save memory during builds - comment out this line and uncomment block below to re-enable | ||
| export default nextConfig; | ||
|
Comment on lines
+128
to
+129
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Disabling Sentry removes critical production observability. Exporting Impact:
Alternative approaches to consider:
💡 Example: Conditional Sentry configuration based on environment-// Disable Sentry to save memory during builds - comment out this line and uncomment block below to re-enable
-export default nextConfig;
-
-/*
-export default withSentryConfig(nextConfig, {
+// Only enable Sentry in production or when explicitly requested
+const shouldEnableSentry = process.env.NODE_ENV === 'production' && process.env.DISABLE_SENTRY !== 'true';
+
+export default shouldEnableSentry ? withSentryConfig(nextConfig, {
org: "Paycrest",
project: "noblocks",
sentryUrl: process.env.SENTRY_URL,
authToken: process.env.SENTRY_AUTH_TOKEN,
release: "2.0.0",
silent: !process.env.CI,
sourcemaps: {
disable: process.env.LOW_MEMORY_BUILD === "true",
},
widenClientFileUpload: true,
tunnelRoute: "/monitoring",
disableLogger: true,
automaticVercelMonitors: true,
-});
-*/
+}) : nextConfig;
🤖 Prompt for AI Agents |
||
|
|
||
| /* | ||
| export default withSentryConfig(nextConfig, { | ||
| org: "Paycrest", | ||
|
|
||
| project: "noblocks", | ||
|
|
||
| sentryUrl: process.env.SENTRY_URL, | ||
|
|
||
| authToken: process.env.SENTRY_AUTH_TOKEN, | ||
|
|
||
| release: "2.0.0", | ||
|
|
||
| silent: !process.env.CI, | ||
|
|
||
| // Disable source map upload in low-memory environments | ||
| sourcemaps: { | ||
| disable: process.env.LOW_MEMORY_BUILD === "true", | ||
| }, | ||
|
|
||
| widenClientFileUpload: true, | ||
|
|
||
| tunnelRoute: "/monitoring", | ||
|
|
||
| disableLogger: true, | ||
|
|
||
| automaticVercelMonitors: true, | ||
| }); | ||
| */ | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misleading comment - disables Sentry at runtime, not just during builds.
The comment states this saves memory "during builds," but exporting
nextConfigdirectly disables Sentry integration entirely, including at runtime in production. This affects error tracking and monitoring in your live application, not just the build process.If the goal is specifically to reduce build memory usage, consider using the existing
LOW_MEMORY_BUILDenvironment variable (referenced in line 140) to disable only sourcemaps during builds, while keeping Sentry active at runtime.🤖 Prompt for AI Agents