Skip to content
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

Staging fails to deploy when NODE_ENV=production #511

Open
PabloCastellano opened this issue Aug 21, 2024 · 0 comments
Open

Staging fails to deploy when NODE_ENV=production #511

PabloCastellano opened this issue Aug 21, 2024 · 0 comments
Labels
CI/CD Continuous Integration & Deployment 👷‍♀️ DX Developer experience

Comments

@PabloCastellano
Copy link
Member

PabloCastellano commented Aug 21, 2024

NODE_ENV=production is required to avoid exhausting the pool of connections to the database. However when setting this variable, Vercel build fails. Error logs point to the @svgr/webpack package (which is defined as a development dependency)

@blobscan/web:build: error - No Sentry organization slug configured. Source maps will not be uploaded.
@blobscan/web:build: To fix this, use Sentry's Vercel integration to automatically set the SENTRY_ORG environment variable: https://vercel.com/integrations/sentry
@blobscan/web:build: 
@blobscan/web:build: Failed to compile.
@blobscan/web:build: 
@blobscan/web:build: ./src/components/AppLayout/BottomBarLayout/index.tsx:8:1
@blobscan/web:build: Module not found: Can't resolve '@svgr/webpack'
@blobscan/web:build:    6 | import { Link } from "~/components/Link";
@blobscan/web:build:    7 | import { env } from "~/env.mjs";
@blobscan/web:build: >  8 | import DiscordIcon from "~/icons/discord.svg";
@blobscan/web:build:      | ^
@blobscan/web:build:    9 | import GithubIcon from "~/icons/github.svg";
@blobscan/web:build: Module not found: Can't resolve '@svgr/webpack'
@blobscan/web:build:    7 | import { env } from "~/env.mjs";
@blobscan/web:build:    8 | import DiscordIcon from "~/icons/discord.svg";
@blobscan/web:build: >  9 | import GithubIcon from "~/icons/github.svg";
@blobscan/web:build:      | ^
@blobscan/web:build: Module not found: Can't resolve '@svgr/webpack'
@blobscan/web:build:    8 | import DiscordIcon from "~/icons/discord.svg";
@blobscan/web:build:    9 | import GithubIcon from "~/icons/github.svg";
@blobscan/web:build: > 10 | import XIcon from "~/icons/x.svg";
@blobscan/web:build:      | ^
@blobscan/web:build:   11 |
@blobscan/web:build:   12 | const EXTERNAL_APPS: { href: string; icon: ReactElement }[] = [
@blobscan/web:build:   13 |   {

UPDATE: My joy in a well. From prisma documentation:

When you use a Function-as-a-Service provider, like Vercel Serverless functions, every invocation may result in a new connection to your database. This can cause your database to quickly run out of open connections and cause your application to stall. For this reason, pooling connections to your database is essential.

@PabloCastellano PabloCastellano added CI/CD Continuous Integration & Deployment 👷‍♀️ DX Developer experience labels Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Continuous Integration & Deployment 👷‍♀️ DX Developer experience
Projects
None yet
Development

No branches or pull requests

1 participant