question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Function size limit exceeded on vercel

See original GitHub issue

Bug description

@janpio as requested, here’s a newly opened issue.

I am running into this error on 2.23 WITHOUT nexus-plugin-prisma so #6932 wont solve it for me.

My bundle size has increased a lot recently and I am not sure why. Vercel logs below with NEXT_DEBUG_FUNCTION_SIZE=1

I am using nx workspace with my prisma client in a lib. It worked fine until recent versions of prisma (2.20 if I recall).

Not sure if it has an effect, but I am using pnpm


18:03:19.224 | Analyzing source code...
-- | --
18:03:20.168 | Installing build runtime...
18:03:22.602 | Build runtime installed: 2.434s
18:03:24.917 | Looking up build cache...
18:03:25.135 | Build cache found. Downloading...
18:03:35.334 | Build cache downloaded [187.60 MB]: 10198.752ms
18:03:36.475 | Running "install" command: `npx pnpm i --frozen-lockfile`...
18:03:37.301 | Lockfile is up-to-date, resolution step is skipped
18:03:37.597 | Progress: resolved 1, reused 0, downloaded 0, added 0
18:03:37.792 | Packages: +20 -16
18:03:37.793 | ++++++++++++++++++++----------------
18:03:38.597 | Progress: resolved 20, reused 0, downloaded 18, added 18
18:03:39.257 | WARN  Failed to find "/fsevents/2.3.2" in lockfile during hoisting. Next aliases will not be hoisted: fsevents
18:03:39.819 | Progress: resolved 20, reused 0, downloaded 20, added 20, done
18:03:39.920 | .../node_modules/@prisma/engines postinstall$ node download/index.js
18:03:43.274 | .../node_modules/@prisma/engines postinstall: Done
18:03:43.277 | .../prisma@2.23.0/node_modules/prisma preinstall$ node scripts/preinstall-entry.js
18:03:43.349 | .../prisma@2.23.0/node_modules/prisma preinstall: Done
18:03:43.350 | .../prisma@2.23.0/node_modules/prisma install$ node scripts/install-entry.js
18:03:43.422 | .../prisma@2.23.0/node_modules/prisma install: Done
18:03:43.469 | .../node_modules/@prisma/client postinstall$ node scripts/postinstall.js
18:03:43.989 | .../node_modules/@prisma/client postinstall: Environment variables loaded from .env
18:03:44.786 | .../node_modules/@prisma/client postinstall: prisma:warn The postinstall script automatically ran `prisma generate` and did not find your `prisma/schema.prisma`.
18:03:44.786 | .../node_modules/@prisma/client postinstall: If you have a Prisma schema file in a custom path, you will need to run
18:03:44.786 | .../node_modules/@prisma/client postinstall: `prisma generate --schema=./path/to/your/schema.prisma` to generate Prisma Client.
18:03:44.786 | .../node_modules/@prisma/client postinstall: If you do not have a Prisma schema file yet, you can ignore this message.
18:03:45.125 | .../node_modules/@prisma/client postinstall: Done
18:03:45.863 | dependencies:
18:03:45.863 | - @prisma/client 2.22.1
18:03:45.863 | + @prisma/client 2.23.0
18:03:45.863 | - @sentry/nextjs 6.3.6
18:03:45.863 | + @sentry/nextjs 6.3.6
18:03:45.863 | - @trpc/next 6.1.1
18:03:45.863 | + @trpc/next 6.1.1
18:03:45.863 | - babel-plugin-superjson-next 0.3.0
18:03:45.863 | + babel-plugin-superjson-next 0.3.0
18:03:45.863 | - next 10.2.2
18:03:45.864 | + next 10.2.0
18:03:45.864 | - next-auth 3.23.0
18:03:45.864 | + next-auth 3.23.0
18:03:45.864 | - storybook-addon-next-router 2.0.4
18:03:45.864 | + storybook-addon-next-router 2.0.4
18:03:45.864 | devDependencies:
18:03:45.864 | - @nrwl/next 12.3.4
18:03:45.864 | + @nrwl/next 12.3.4
18:03:45.864 | - prisma 2.22.1
18:03:45.864 | + prisma 2.23.0
18:03:45.885 | Detected Next.js version: 10.2.0
18:03:46.072 | Running "npx nx build agent-pay --with-deps --prod --skip-nx-cache"
18:03:48.233 | > nx run agent-pay:build:production
18:03:49.103 | >  NX  Running target codegen for 3 project(s):
18:03:49.103 | - legacy-mimir
18:03:49.103 | - legacy-vor
18:03:49.104 | - db
18:03:49.104 | β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
18:03:49.132 | > nx run db:codegen
18:03:49.748 | Environment variables loaded from .env
18:03:50.521 | Prisma schema loaded from libs/db/prisma/src/schema.prisma
18:03:52.901 | βœ” Generated Prisma Client (2.23.0) to ./dist/libs/db/prisma in 270ms
18:03:52.901 | βœ” Generated DBML Schema to ./libs/db/prisma/src/dbml in 17ms
18:03:52.901 | You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
18:03:52.902 | ```
18:03:52.902 | import { PrismaClient } from './dist/libs/db/prisma'
18:03:52.902 | const prisma = new PrismaClient()
18:03:52.902 | ```
18:03:52.963 | > nx run legacy-vor:codegen
18:03:53.884 | [16:03:53] Parse configuration [started]
18:03:53.885 | [16:03:53] Parse configuration [completed]
18:03:53.885 | [16:03:53] Generate outputs [started]
18:03:53.886 | [16:03:53] Generate ./libs/legacy/vor/src/generated/graphql.ts [started]
18:03:53.886 | [16:03:53] Load GraphQL schemas [started]
18:03:58.586 | [16:03:58] Load GraphQL schemas [completed]
18:03:58.586 | [16:03:58] Load GraphQL documents [started]
18:03:58.601 | [16:03:58] Load GraphQL documents [completed]
18:03:58.601 | [16:03:58] Generate [started]
18:03:58.755 | [16:03:58] Generate [completed]
18:03:58.756 | [16:03:58] Generate ./libs/legacy/vor/src/generated/graphql.ts [completed]
18:03:58.756 | [16:03:58] Generate outputs [completed]
18:04:04.868 | > nx run legacy-mimir:codegen
18:04:05.765 | [16:04:05] Parse configuration [started]
18:04:05.766 | [16:04:05] Parse configuration [completed]
18:04:05.766 | [16:04:05] Generate outputs [started]
18:04:05.767 | [16:04:05] Generate ./libs/legacy/mimir/src/generated/graphql.ts [started]
18:04:05.767 | [16:04:05] Load GraphQL schemas [started]
18:04:06.594 | [16:04:06] Load GraphQL schemas [completed]
18:04:06.594 | [16:04:06] Load GraphQL documents [started]
18:04:06.619 | [16:04:06] Load GraphQL documents [completed]
18:04:06.619 | [16:04:06] Generate [started]
18:04:06.836 | [16:04:06] Generate [completed]
18:04:06.836 | [16:04:06] Generate ./libs/legacy/mimir/src/generated/graphql.ts [completed]
18:04:06.836 | [16:04:06] Generate outputs [completed]
18:04:13.275 | β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
18:04:13.275 | >  NX   SUCCESS  Running target "codegen" succeeded
18:04:13.933 | > nx run agent-pay:next-build:production --outputPath=.
18:04:15.363 | info  - Loaded env from apps/agent-pay/.env
18:04:16.102 | info  - Using webpack 4. Reason: custom webpack configuration in next.config.js https://nextjs.org/docs/messages/webpack5
18:04:16.430 | withNx() plugin: Detected Vercel build environment, applying "experimental-serverless-trace" target
18:04:17.177 | info  - Using webpack 4. Reason: custom webpack configuration in next.config.js https://nextjs.org/docs/messages/webpack5
18:04:17.179 | info  - Checking validity of types...
18:04:30.186 | info  - Creating an optimized production build...
18:04:30.979 | info  - Using external babel configuration from /vercel/path0/apps/agent-pay/.babelrc
18:04:33.485 | info  - Using external babel configuration from /vercel/path0/libs/utils/sentry/.babelrc
18:04:33.905 | info  - Using external babel configuration from /vercel/path0/libs/authentication/.babelrc
18:04:33.925 | info  - Using external babel configuration from /vercel/path0/libs/common/.babelrc
18:04:37.460 | info  - Using external babel configuration from /vercel/path0/libs/utils/segment/.babelrc
18:04:37.464 | info  - Using external babel configuration from /vercel/path0/libs/utils/rollout/.babelrc
18:04:37.489 | info  - Using external babel configuration from /vercel/path0/libs/authorization/.babelrc
18:04:37.537 | info  - Using external babel configuration from /vercel/path0/libs/db/trpc/client/.babelrc
18:04:37.972 | info  - Using external babel configuration from /vercel/path0/libs/legacy/moment/.babelrc
18:04:37.974 | info  - Using external babel configuration from /vercel/path0/libs/legacy/mimir/.babelrc
18:04:37.976 | info  - Using external babel configuration from /vercel/path0/libs/legacy/vor/.babelrc
18:04:46.420 | [BABEL] Note: The code generator has deoptimised the styling of /vercel/path0/dist/libs/db/prisma/index.js as it exceeds the max of 500KB.
18:04:53.840 | [BABEL] Note: The code generator has deoptimised the styling of /vercel/path0/dist/libs/db/prisma/runtime/index.js as it exceeds the max of 500KB.
18:05:04.259 | > Found 29 release files
18:05:04.272 | > Analyzing 29 sources
18:05:04.503 | > Rewriting sources
18:05:04.815 | > Adding source map references
18:05:05.975 | > Bundled 29 files for upload
18:05:06.749 | > Uploaded release files to Sentry
18:05:06.909 | > File upload complete (processing pending on server)
18:05:06.910 | Source Map Upload Report
18:05:06.910 | Scripts
18:05:06.910 | ~/_next/server/13.9f1052b17cb133a980ef.js
18:05:06.910 | ~/_next/server/pages/_app.js
18:05:06.910 | ~/_next/server/pages/_document.js
18:05:06.910 | ~/_next/server/pages/_error.js
18:05:06.910 | ~/_next/server/pages/agent/[id].js
18:05:06.911 | ~/_next/server/pages/agents.js
18:05:06.911 | ~/_next/server/pages/api/mimir/graphql.js
18:05:06.911 | ~/_next/server/pages/api/vor/graphql.js
18:05:06.911 | ~/_next/server/pages/auth/signin.js
18:05:06.911 | ~/_next/server/pages/auth/signout.js
18:05:06.911 | ~/_next/server/pages/index.js
18:05:06.911 | ~/_next/server/pages/logged-in.js
18:05:06.911 | ~/_next/server/pages/yard.js
18:05:06.912 | ~/_next/server/ssr-module-cache.js
18:05:06.912 | Minified Scripts
18:05:06.912 | ~/_next/server/pages/api/auth/[...nextauth].js (sourcemap at [...nextauth].js.map)
18:05:06.912 | Source Maps
18:05:06.912 | ~/_next/server/13.9f1052b17cb133a980ef.js.map
18:05:06.912 | ~/_next/server/pages/_app.js.map
18:05:06.912 | ~/_next/server/pages/_document.js.map
18:05:06.913 | ~/_next/server/pages/_error.js.map
18:05:06.913 | ~/_next/server/pages/agent/[id].js.map
18:05:06.913 | ~/_next/server/pages/agents.js.map
18:05:06.913 | ~/_next/server/pages/api/auth/[...nextauth].js.map
18:05:06.913 | ~/_next/server/pages/api/mimir/graphql.js.map
18:05:06.913 | ~/_next/server/pages/api/vor/graphql.js.map
18:05:06.913 | ~/_next/server/pages/auth/signin.js.map
18:05:06.914 | ~/_next/server/pages/auth/signout.js.map
18:05:06.914 | ~/_next/server/pages/index.js.map
18:05:06.914 | ~/_next/server/pages/logged-in.js.map
18:05:06.914 | ~/_next/server/pages/yard.js.map
18:05:32.510 | > Found 84 release files
18:05:32.526 | > Analyzing 84 sources
18:05:32.860 | > Rewriting sources
18:05:33.537 | > Adding source map references
18:05:35.288 | > Bundled 84 files for upload
18:05:36.427 | > Uploaded release files to Sentry
18:05:36.607 | > File upload complete (processing pending on server)
18:05:36.608 | Source Map Upload Report
18:05:36.608 | Scripts
18:05:36.608 | ~/_next/server/13.9f1052b17cb133a980ef.js
18:05:36.608 | ~/_next/server/pages/_app.js
18:05:36.608 | ~/_next/server/pages/_document.js
18:05:36.608 | ~/_next/server/pages/_error.js
18:05:36.608 | ~/_next/server/pages/agent/[id].js
18:05:36.608 | ~/_next/server/pages/agents.js
18:05:36.609 | ~/_next/server/pages/api/mimir/graphql.js
18:05:36.609 | ~/_next/server/pages/api/vor/graphql.js
18:05:36.609 | ~/_next/server/pages/auth/signin.js
18:05:36.609 | ~/_next/server/pages/auth/signout.js
18:05:36.609 | ~/_next/server/pages/index.js
18:05:36.609 | ~/_next/server/pages/logged-in.js
18:05:36.609 | ~/_next/server/pages/yard.js
18:05:36.609 | ~/_next/server/ssr-module-cache.js
18:05:36.609 | ~/_next/static/r3WPQUx_0chYrCCjPlK9i/_ssgManifest.js
18:05:36.609 | Minified Scripts
18:05:36.609 | ~/_next/server/pages/api/auth/[...nextauth].js (sourcemap at [...nextauth].js.map)
18:05:36.609 | ~/_next/static/chunks/25.63c289130052019be216.js (sourcemap at 25.63c289130052019be216.js.map)
18:05:36.609 | ~/_next/static/chunks/2f179c7d.f775645be48a42584449.js (sourcemap at 2f179c7d.f775645be48a42584449.js.map)
18:05:36.609 | ~/_next/static/chunks/385447c0e4e0be4775d546b7e9af718844e69059.221f163af54b57da42dd.js (sourcemap at 385447c0e4e0be4775d546b7e9af718844e69059.221f163af54b57da42dd.js.map)
18:05:36.609 | ~/_next/static/chunks/54ed3978.39d5688ac57ec0c2b2ba.js (sourcemap at 54ed3978.39d5688ac57ec0c2b2ba.js.map)
18:05:36.609 | ~/_next/static/chunks/674b5c70.a751003776842146359a.js (sourcemap at 674b5c70.a751003776842146359a.js.map)
18:05:36.609 | ~/_next/static/chunks/6a2ce0ce60a6102ea546b195b77a435e750d1c95.3d8fa2f111f4e08339e3.js (sourcemap at 6a2ce0ce60a6102ea546b195b77a435e750d1c95.3d8fa2f111f4e08339e3.js.map)
18:05:36.609 | ~/_next/static/chunks/a22d7b0a0b0507f6daaa624ec1e650cc133cfbd1.407724b6ac81118411d0.js (sourcemap at a22d7b0a0b0507f6daaa624ec1e650cc133cfbd1.407724b6ac81118411d0.js.map)
18:05:36.609 | ~/_next/static/chunks/c85c00a3.d986baad68475c70246d.js (sourcemap at c85c00a3.d986baad68475c70246d.js.map)
18:05:36.609 | ~/_next/static/chunks/ce61a669ffb34e930a63f5bd17c6e5157d8dde99.47d4c5618f66e6abdf44.js (sourcemap at ce61a669ffb34e930a63f5bd17c6e5157d8dde99.47d4c5618f66e6abdf44.js.map)
18:05:36.609 | ~/_next/static/chunks/commons.a7bff84a38aa419f0fe5.js (sourcemap at commons.a7bff84a38aa419f0fe5.js.map)
18:05:36.609 | ~/_next/static/chunks/db9c4727d218a8b6788016e90f400f0b0902933d.a06ccc125cbfcfaeab9f.js (sourcemap at db9c4727d218a8b6788016e90f400f0b0902933d.a06ccc125cbfcfaeab9f.js.map)
18:05:36.609 | ~/_next/static/chunks/e431992a3e33d6fda88663cff8ac4a148672e11f.e95f2d85352b1d347228.js (sourcemap at e431992a3e33d6fda88663cff8ac4a148672e11f.e95f2d85352b1d347228.js.map)
18:05:36.609 | ~/_next/static/chunks/f69bbb46.c05b59d304144231d6ae.js (sourcemap at f69bbb46.c05b59d304144231d6ae.js.map)
18:05:36.609 | ~/_next/static/chunks/f9c45baebc58af58b2d09b0511999eefe683b72f.3b63ff200b4c09e0aa33.js (sourcemap at f9c45baebc58af58b2d09b0511999eefe683b72f.3b63ff200b4c09e0aa33.js.map)
18:05:36.609 | ~/_next/static/chunks/main-6296c5822161096325e8.js (sourcemap at main-6296c5822161096325e8.js.map)
18:05:36.609 | ~/_next/static/chunks/pages/_app-3f779f649f767130855d.js (sourcemap at _app-3f779f649f767130855d.js.map)
18:05:36.609 | ~/_next/static/chunks/pages/_error-82bbca6c00087b20a0ca.js (sourcemap at _error-82bbca6c00087b20a0ca.js.map)
18:05:36.609 | ~/_next/static/chunks/pages/agent/[id]-67744440d97ab280982d.js (sourcemap at [id]-67744440d97ab280982d.js.map)
18:05:36.609 | ~/_next/static/chunks/pages/agents-359fbecb79aa467d1e90.js (sourcemap at agents-359fbecb79aa467d1e90.js.map)
18:05:36.609 | ~/_next/static/chunks/pages/auth/signin-c04e9cbe089eabf69f9b.js (sourcemap at signin-c04e9cbe089eabf69f9b.js.map)
18:05:36.609 | ~/_next/static/chunks/pages/auth/signout-dc1b85d20939f631c4ed.js (sourcemap at signout-dc1b85d20939f631c4ed.js.map)
18:05:36.609 | ~/_next/static/chunks/pages/index-9de4cbd0fc990c47da95.js (sourcemap at index-9de4cbd0fc990c47da95.js.map)
18:05:36.609 | ~/_next/static/chunks/pages/logged-in-cfd9eebfd7078a294cc3.js (sourcemap at logged-in-cfd9eebfd7078a294cc3.js.map)
18:05:36.610 | ~/_next/static/chunks/pages/yard-e14e6d323c32769a57d6.js (sourcemap at yard-e14e6d323c32769a57d6.js.map)
18:05:36.610 | ~/_next/static/chunks/polyfills-2439cf82be4a08c0281b.js (sourcemap at polyfills-2439cf82be4a08c0281b.js.map)
18:05:36.610 | ~/_next/static/chunks/webpack-f87ffba474f0bb3449c6.js (sourcemap at webpack-f87ffba474f0bb3449c6.js.map)
18:05:36.610 | ~/_next/static/r3WPQUx_0chYrCCjPlK9i/_buildManifest.js (no sourcemap ref)
18:05:36.610 | - warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/_next/static/r3WPQUx_0chYrCCjPlK9i/_buildManifest.js.)
18:05:36.610 | Source Maps
18:05:36.610 | ~/_next/server/13.9f1052b17cb133a980ef.js.map
18:05:36.610 | ~/_next/server/pages/_app.js.map
18:05:36.610 | ~/_next/server/pages/_document.js.map
18:05:36.610 | ~/_next/server/pages/_error.js.map
18:05:36.610 | ~/_next/server/pages/agent/[id].js.map
18:05:36.610 | ~/_next/server/pages/agents.js.map
18:05:36.610 | ~/_next/server/pages/api/auth/[...nextauth].js.map
18:05:36.610 | ~/_next/server/pages/api/mimir/graphql.js.map
18:05:36.610 | ~/_next/server/pages/api/vor/graphql.js.map
18:05:36.610 | ~/_next/server/pages/auth/signin.js.map
18:05:36.610 | ~/_next/server/pages/auth/signout.js.map
18:05:36.610 | ~/_next/server/pages/index.js.map
18:05:36.610 | ~/_next/server/pages/logged-in.js.map
18:05:36.610 | ~/_next/server/pages/yard.js.map
18:05:36.610 | ~/_next/static/chunks/25.63c289130052019be216.js.map
18:05:36.610 | ~/_next/static/chunks/2f179c7d.f775645be48a42584449.js.map
18:05:36.610 | ~/_next/static/chunks/385447c0e4e0be4775d546b7e9af718844e69059.221f163af54b57da42dd.js.map
18:05:36.610 | ~/_next/static/chunks/54ed3978.39d5688ac57ec0c2b2ba.js.map
18:05:36.610 | ~/_next/static/chunks/674b5c70.a751003776842146359a.js.map
18:05:36.610 | ~/_next/static/chunks/6a2ce0ce60a6102ea546b195b77a435e750d1c95.3d8fa2f111f4e08339e3.js.map
18:05:36.610 | ~/_next/static/chunks/a22d7b0a0b0507f6daaa624ec1e650cc133cfbd1.407724b6ac81118411d0.js.map
18:05:36.610 | ~/_next/static/chunks/c85c00a3.d986baad68475c70246d.js.map
18:05:36.610 | ~/_next/static/chunks/ce61a669ffb34e930a63f5bd17c6e5157d8dde99.47d4c5618f66e6abdf44.js.map
18:05:36.610 | ~/_next/static/chunks/commons.a7bff84a38aa419f0fe5.js.map
18:05:36.610 | ~/_next/static/chunks/db9c4727d218a8b6788016e90f400f0b0902933d.a06ccc125cbfcfaeab9f.js.map
18:05:36.610 | ~/_next/static/chunks/e431992a3e33d6fda88663cff8ac4a148672e11f.e95f2d85352b1d347228.js.map
18:05:36.610 | ~/_next/static/chunks/f69bbb46.c05b59d304144231d6ae.js.map
18:05:36.610 | ~/_next/static/chunks/f9c45baebc58af58b2d09b0511999eefe683b72f.3b63ff200b4c09e0aa33.js.map
18:05:36.611 | ~/_next/static/chunks/main-6296c5822161096325e8.js.map
18:05:36.611 | ~/_next/static/chunks/pages/_app-3f779f649f767130855d.js.map
18:05:36.611 | ~/_next/static/chunks/pages/_error-82bbca6c00087b20a0ca.js.map
18:05:36.611 | ~/_next/static/chunks/pages/agent/[id]-67744440d97ab280982d.js.map
18:05:36.611 | ~/_next/static/chunks/pages/agents-359fbecb79aa467d1e90.js.map
18:05:36.611 | ~/_next/static/chunks/pages/auth/signin-c04e9cbe089eabf69f9b.js.map
18:05:36.611 | ~/_next/static/chunks/pages/auth/signout-dc1b85d20939f631c4ed.js.map
18:05:36.611 | ~/_next/static/chunks/pages/index-9de4cbd0fc990c47da95.js.map
18:05:36.611 | ~/_next/static/chunks/pages/logged-in-cfd9eebfd7078a294cc3.js.map
18:05:36.611 | ~/_next/static/chunks/pages/yard-e14e6d323c32769a57d6.js.map
18:05:36.611 | ~/_next/static/chunks/polyfills-2439cf82be4a08c0281b.js.map
18:05:36.611 | ~/_next/static/chunks/webpack-f87ffba474f0bb3449c6.js.map
18:05:36.611 | ~/_next/static/css/38121e383cb6d3f501ec.css.map
18:05:37.237 | info  - Compiled successfully
18:05:37.237 | info  - Collecting page data...
18:05:38.869 | info  - Generating static pages (0/7)
18:05:39.793 | info  - Generating static pages (1/7)
18:05:39.820 | info  - Generating static pages (3/7)
18:05:39.838 | info  - Generating static pages (5/7)
18:05:39.966 | info  - Generating static pages (7/7)
18:05:39.966 | info  - Finalizing page optimization...
18:05:39.978 | Page                                                           Size     First Load JS
18:05:39.978 | β”Œ Ξ» /                                                          1.89 kB         627 kB
18:05:39.978 | β”œ   /_app                                                      0 B             625 kB
18:05:39.978 | β”œ β—‹ /404                                                       3.77 kB         629 kB
18:05:39.978 | β”œ β—‹ /agent/[id]                                                5.91 kB         781 kB
18:05:39.978 | β”œ β—‹ /agents                                                    18.7 kB         794 kB
18:05:39.978 | β”œ Ξ» /api/auth/[...nextauth]                                    0 B             625 kB
18:05:39.978 | β”œ Ξ» /api/mimir/graphql                                         0 B             625 kB
18:05:39.978 | β”œ Ξ» /api/vor/graphql                                           0 B             625 kB
18:05:39.978 | β”œ β—‹ /auth/signin                                               599 B           626 kB
18:05:39.978 | β”œ β—‹ /auth/signout                                              612 B           626 kB
18:05:39.978 | β”œ Ξ» /logged-in                                                 401 B           626 kB
18:05:39.978 | β”” β—‹ /yard                                                      7.39 kB         633 kB
18:05:39.978 | + First Load JS shared by all                                  625 kB
18:05:39.978 | β”œ chunks/2f179c7d.f77564.js                                  37.1 kB
18:05:39.978 | β”œ chunks/54ed3978.39d568.js                                  89.3 kB
18:05:39.979 | β”œ chunks/6a2ce0ce60a6102ea546b195b77a435e750d1c95.3d8fa2.js  5.35 kB
18:05:39.979 | β”œ chunks/a22d7b0a0b0507f6daaa624ec1e650cc133cfbd1.407724.js  23 kB
18:05:39.979 | β”œ chunks/ce61a669ffb34e930a63f5bd17c6e5157d8dde99.47d4c5.js  65.9 kB
18:05:39.979 | β”œ chunks/commons.a7bff8.js                                   4.99 kB
18:05:39.979 | β”œ chunks/db9c4727d218a8b6788016e90f400f0b0902933d.a06ccc.js  73.4 kB
18:05:39.979 | β”œ chunks/e431992a3e33d6fda88663cff8ac4a148672e11f.e95f2d.js  11.3 kB
18:05:39.979 | β”œ chunks/f69bbb46.c05b59.js                                  24.7 kB
18:05:39.979 | β”œ chunks/f9c45baebc58af58b2d09b0511999eefe683b72f.3b63ff.js  93.9 kB
18:05:39.979 | β”œ chunks/main.6296c5.js                                      8.83 kB
18:05:39.979 | β”œ chunks/pages/_app.3f779f.js                                186 kB
18:05:39.979 | β”œ chunks/webpack.f87ffb.js                                   1.24 kB
18:05:39.979 | β”” css/38121e383cb6d3f501ec.css                               1.55 kB
18:05:39.979 | Ξ»  (Server)  server-side renders at runtime (uses getInitialProps or getServerSideProps)
18:05:39.979 | β—‹  (Static)  automatically rendered as static HTML (uses no initial props)
18:05:39.979 | ●  (SSG)     automatically generated as static HTML + JSON (uses getStaticProps)
18:05:39.979 | (ISR)     incremental static regeneration (uses revalidate in getStaticProps)
18:05:41.045 | β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
18:05:41.045 | >  NX   SUCCESS  Running target "build" succeeded
18:05:41.050 | >  NX   CLOUD  See run details at https://nx.app/runs/23xck2cWenF
18:06:28.514 | Traced Next.js server files in: 47.425s
18:06:49.193 | Serverless function size info
18:06:49.194 | Serverless Function's pages: index.js, logged-in.js
18:06:49.195 | Large Dependencies  Uncompressed size  Compressed size
18:06:49.195 | pages/index.js                 487 kB           114 kB
18:06:49.195 | All dependencies              1.07 MB           292 kB
18:06:49.195 | Serverless Function's page: api/auth/[...nextauth].js
18:06:49.212 | Large Dependencies                                               Uncompressed size  Compressed size
18:06:49.212 | dist/libs/db                                                               45.3 MB          15.5 MB
18:06:49.212 | node_modules/.pnpm/@sentry+cli@1.64.2                                      17.8 MB          6.71 MB
18:06:49.212 | node_modules/.pnpm/next@10.2.0_507781d099a67956587e23f5ac79078b              16 MB          3.48 MB
18:06:49.212 | node_modules/.pnpm/sass@1.32.13                                            4.02 MB           594 kB
18:06:49.212 | node_modules/.pnpm/typeorm@0.2.32                                          3.06 MB           513 kB
18:06:49.212 | node_modules/.pnpm/highlight.js@10.7.2                                     1.42 MB           459 kB
18:06:49.212 | node_modules/.pnpm/webpack@4.42.0                                          1.31 MB           357 kB
18:06:49.212 | node_modules/.pnpm/react-dom@17.0.2_react@17.0.2                           1.18 MB           290 kB
18:06:49.212 | node_modules/.pnpm/caniuse-lite@1.0.30001228                                686 kB           271 kB
18:06:49.212 | pages/api/auth/[...nextauth].js                                            1.83 MB           249 kB
18:06:49.212 | node_modules/.pnpm/iconv-lite@0.6.2                                         328 kB           179 kB
18:06:49.212 | node_modules/.pnpm/iconv-lite@0.4.24                                        323 kB           177 kB
18:06:49.212 | node_modules/.pnpm/terser@4.8.0                                             365 kB           103 kB
18:06:49.212 | node_modules/.pnpm/nodemailer@6.6.0                                         435 kB           100 kB
18:06:49.212 | All dependencies                                                            104 MB          31.7 MB
18:06:49.213 | Serverless Function's pages: api/mimir/graphql.js, api/vor/graphql.js
18:06:49.225 | Large Dependencies                                               Uncompressed size  Compressed size
18:06:49.225 | node_modules/.pnpm/@sentry+cli@1.64.2                                      17.8 MB          6.71 MB
18:06:49.225 | node_modules/.pnpm/next@10.2.0_507781d099a67956587e23f5ac79078b              16 MB          3.48 MB
18:06:49.225 | node_modules/.pnpm/sass@1.32.13                                            4.02 MB           594 kB
18:06:49.225 | node_modules/.pnpm/webpack@4.42.0                                          1.31 MB           357 kB
18:06:49.225 | node_modules/.pnpm/react-dom@17.0.2_react@17.0.2                           1.18 MB           290 kB
18:06:49.225 | node_modules/.pnpm/caniuse-lite@1.0.30001228                                686 kB           271 kB
18:06:49.225 | node_modules/.pnpm/iconv-lite@0.6.2                                         328 kB           179 kB
18:06:49.225 | node_modules/.pnpm/iconv-lite@0.4.24                                        323 kB           177 kB
18:06:49.225 | node_modules/.pnpm/terser@4.8.0                                             365 kB           103 kB
18:06:49.225 | All dependencies                                                           50.5 MB          14.5 MB
18:06:51.013 | Created all serverless functions in: 22.498s
18:07:05.317 | Failed to process build result for "api/auth/[...nextauth]". Data: {"type":"Lambda","zipBuffer":{"type":"Buffer","data":[80,75,3,4,20,0,0,8,8,0,216,128,180,82,235,58,148,11,209,0,0,0,21,1,0,0,4,0,0,0,46,101,110,118,141,142,189,110,131,48,24,69,119,158,194,82,102,28,18,40,49,149,24,18,176,212,42,212,68,169,169,200,100,249,.
18:07:05.574 | Error: The Serverless Function "api/auth/[...nextauth]" is 64.26mb which exceeds the maximum size limit of 50mb. Learn More: https://vercel.link/serverless-function-size

How to reproduce

I am not sure if I can reproduce this with a new repo as I’d need to write some pretty big amount of code to get to the size limit

Environment & setup

  • OS: On vercel so uses AWS Lambda under the hood
  • Database: PostgreSQL
  • Node.js version: 14

Prisma Version

2.23

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
arbejdcommented, Apr 19, 2022

@lucas-janon Thank you! That worked like a charm. Can i buy you a beer somewhere?

1reaction
lucas-janoncommented, Dec 8, 2021

Hello @cyrus-za! We’re having the exact same problem with our monorepo, getting dependencies from other packages bundled into our Next.js API routes, causing an oversize issue. I’m curious about how you solved it, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Limits – Vercel Docs
The maximum size for a Serverless Function is 50 MB and the maximum unzipped size is 250 MB including layers which are automatically...
Read more >
VueJS - The Serverless Function exceeds the maximum size ...
The Serverless Function "index" is 64.76mb which exceeds the maximum size limit of 50mb. I have spent a lot of my time trying...
Read more >
Nuxt app won't deploy to vercel because 'The Serverless ...
Nuxt app won't deploy to vercel because 'The Serverless Function "index" is 67.21mb which exceeds the maximum size limit of 50mb.'.
Read more >
Deploy Frontity to Vercel - Get Help
For what I understood, I have to upload to Vercel the Frontity project ... size limit: The following asset(s) exceed the recommended sizeΒ ......
Read more >
Limits Β· Cloudflare Pages docs
Cloudflare Pages sites can contain up to 20,000 files. ​​ File size. The maximum file size for a single Cloudflare Pages site asset...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found