From 2fa58c3a885ef037f6cb5264464beb1c9ef1a72b Mon Sep 17 00:00:00 2001 From: Jesse Koldewijn <60965908+JesseKoldewijn@users.noreply.github.com> Date: Tue, 23 May 2023 17:41:59 +0200 Subject: [PATCH] fix: Added blockfrost-js, lucid-cardano & mongoose package to srvExtPackages to prevent issue #49783 from happening. (#49938) fixes #49783 ### What? Added the following packages to the server component exclusion list which prevents these packages from going through the currently default compile pipeline for apps that use the App Router. Packages added are: "@blockfrost/blockfrost-js", "@jpg-store/lucid-cardano" and "mongoose". (For instance, mongo was already in this exclusion list) ### Why? These packages are required by the "@emurgo/cardano-serialization-lib-nodejs" packages and break when not added to this list while using the app router. ### How? I've added these packages to the server-external-packages json file in the Next.js package's lib directory. --- packages/next/src/lib/server-external-packages.json | 3 +++ pnpm-lock.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/next/src/lib/server-external-packages.json b/packages/next/src/lib/server-external-packages.json index 6b9eb5db08b4f..2af3637b92672 100644 --- a/packages/next/src/lib/server-external-packages.json +++ b/packages/next/src/lib/server-external-packages.json @@ -1,4 +1,6 @@ [ + "@blockfrost/blockfrost-js", + "@jpg-store/lucid-cardano", "@prisma/client", "@vercel/og", "@sentry/nextjs", @@ -19,6 +21,7 @@ "lodash", "mdx-bundler", "mongodb", + "mongoose", "next-mdx-remote", "next-seo", "pg", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9826ac9335499..23ffc3d85168e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25514,4 +25514,4 @@ packages: resolution: {tarball: https://codeload.github.com/watson/ci-info/tar.gz/f43f6a1cefff47fb361c88cf4b943fdbcaafe540} name: ci-info version: 2.0.0 - dev: true + dev: true \ No newline at end of file