diff --git a/package.json b/package.json index 56c37d6e..d41676ab 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "@sentry/integrations": "^5.11.1", "@sentry/node": "^5.11.1", "@zeit/next-source-maps": "^0.0.3", + "dotenv": "^8.2.0", "express": "^4.17.1", "next": "^9.2.1", "react": "^16.12.0", diff --git a/server.js b/server.js index e51597b5..c7e9fc15 100644 --- a/server.js +++ b/server.js @@ -1,3 +1,4 @@ +require("dotenv").config(); const next = require("next"); const express = require("express"); const port = parseInt(process.env.PORT, 10) || 3030; diff --git a/src/sentry.js b/src/sentry.js index 86f175fb..83aaccf0 100644 --- a/src/sentry.js +++ b/src/sentry.js @@ -14,6 +14,7 @@ module.exports = (release = process.env.SENTRY_RELEASE) => { // When we're developing locally if (process.env.NODE_ENV !== "production") { // Don't actually send the errors to Sentry + sentryOptions.transport = sentryTransport; sentryOptions.beforeSend = () => null; // Instead, dump the errors to the console diff --git a/yarn.lock b/yarn.lock index 026d70cb..81364867 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3367,6 +3367,11 @@ dot-prop@^5.0.0: dependencies: is-obj "^2.0.0" +dotenv@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" + integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== + duplexer@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1"