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

vercel部署出错 Error: A Serverless Function has exceeded the unzipped maximum size of 250 MB. #10

Open
fengyunzaidushi opened this issue Oct 20, 2024 · 1 comment

Comments

@fengyunzaidushi
Copy link
Contributor

这里说超出了250M

○  (Static)   prerendered as static content
●  (SSG)      prerendered as static HTML (uses getStaticProps)
ƒ  (Dynamic)  server-rendered on demand
Done in 164.61s.
Traced Next.js server files in: 54.049ms
Warning: Max serverless function size of 250 MB uncompressed almost reached
Serverless Function's page: [lang]/editor.js
Large Dependencies           Uncompressed size
node_modules/canvas/build            178.98 MB
node_modules/.prisma/client           64.32 MB
.next/server/chunks                    2.82 MB
node_modules/next/dist                 1.04 MB
node_modules/react-dom/cjs           545.26 KB
All dependencies                      248.7 MB
Created all serverless functions in: 2.136s
Collected static files (public/, static/, .next/static): 14.921ms
Build Completed in /vercel/output [5m]
Deploying outputs...
Error: A Serverless Function has exceeded the unzipped maximum size of 250 MB. : https://vercel.link/serverless-function-size
@fengyunzaidushi
Copy link
Contributor Author

[13:49:25.447] Running build in Washington, D.C., USA (East) – iad1
[13:49:25.616] Cloning github.com/fengyunzaidushi/fxy-ai-outpainting-com (Branch: master, Commit: 5e67099)
[13:49:25.977] Previous build cache not available
[13:49:26.178] Cloning completed: 561.134ms
[13:49:26.574] Running "vercel build"
[13:49:27.031] Vercel CLI 37.9.0
[13:49:27.557] Running "install" command: `yarn install`...
[13:49:27.889] yarn install v1.22.19
[13:49:27.918] info No lockfile found.
[13:49:27.926] [1/4] Resolving packages...
[13:49:28.304] warning canvas > @mapbox/node-pre-gyp > [email protected]: This package is no longer supported.
[13:49:28.357] warning canvas > @mapbox/node-pre-gyp > [email protected]: Rimraf versions prior to v4 are no longer supported
[13:49:28.398] warning canvas > @mapbox/node-pre-gyp > npmlog > [email protected]: This package is no longer supported.
[13:49:28.413] warning canvas > @mapbox/node-pre-gyp > npmlog > [email protected]: This package is no longer supported.
[13:49:28.428] warning canvas > @mapbox/node-pre-gyp > rimraf > [email protected]: Glob versions prior to v9 are no longer supported
[13:49:28.466] warning canvas > @mapbox/node-pre-gyp > rimraf > glob > [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
[13:49:48.791] warning vue > @vue/compiler-sfc > magic-string > [email protected]: Please use @jridgewell/sourcemap-codec instead
[13:49:49.076] warning webpack > terser-webpack-plugin > cacache > [email protected]: Glob versions prior to v9 are no longer supported
[13:49:49.078] warning webpack > terser-webpack-plugin > cacache > [email protected]: Rimraf versions prior to v4 are no longer supported
[13:49:49.256] warning webpack > terser-webpack-plugin > cacache > @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
[13:49:49.257] warning webpack > terser-webpack-plugin > cacache > @npmcli/move-file > [email protected]: Rimraf versions prior to v4 are no longer supported
[13:49:51.011] warning @lingui/cli > [email protected]: Glob versions prior to v9 are no longer supported
[13:49:55.833] warning @types/pino-multi-stream > @types/pino > @types/[email protected]: This is a stub types definition. pino-pretty provides its own type definitions, so you do not need this installed.
[13:49:55.839] warning @types/pino-multi-stream > @types/pino > @types/[email protected]: This is a stub types definition. pino-std-serializers provides its own type definitions, so you do not need this installed.
[13:49:56.066] warning [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options.
[13:49:56.168] warning eslint > @humanwhocodes/[email protected]: Use @eslint/config-array instead
[13:49:56.233] warning eslint > file-entry-cache > flat-cache > [email protected]: Rimraf versions prior to v4 are no longer supported
[13:49:56.251] warning eslint > @humanwhocodes/config-array > @humanwhocodes/[email protected]: Use @eslint/object-schema instead
[13:50:01.468] warning wrangler > @esbuild-plugins/node-modules-polyfill > rollup-plugin-node-polyfills > [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
[13:50:01.894] [2/4] Fetching packages...
[13:51:10.859] warning [email protected]: The engine "pnpm" appears to be invalid.
[13:51:10.867] warning [email protected]: The engine "pnpm" appears to be invalid.
[13:51:10.869] [3/4] Linking dependencies...
[13:51:47.485] [4/4] Building fresh packages...
[13:51:52.901] success Saved lockfile.
[13:51:52.907] Done in 145.02s.
[13:51:53.015] Detected Next.js version: 14.2.15
[13:51:53.015] Running "yarn build"
[13:51:53.222] yarn run v1.22.19
[13:51:53.255] $ prisma generate && next build
[13:51:53.807] Environment variables loaded from .env
[13:51:53.810] Prisma schema loaded from schema.prisma
[13:51:54.735] 
[13:51:54.736] ✔ Generated Prisma Client (v5.21.1) to ./node_modules/@prisma/client in 146ms
[13:51:54.736] 
[13:51:54.736] Start by importing your Prisma Client (See: http://pris.ly/d/importing-client)
[13:51:54.736] 
[13:51:54.737] Tip: Want real-time updates to your database without manual polling? Discover how with Pulse: https://pris.ly/tip-0-pulse
[13:51:54.742] 
[13:51:55.702] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[13:51:55.703] This information is used to shape Next.js' roadmap and prioritize features.
[13:51:55.703] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[13:51:55.703] https://nextjs.org/telemetry
[13:51:55.703] 
[13:51:55.779]   ▲ Next.js 14.2.15
[13:51:55.780]   - Environments: .env.production, .env
[13:51:55.780]   - Experiments (use with caution):
[13:51:55.781]     · swcPlugins
[13:51:55.781] 
[13:51:55.867]    Creating an optimized production build ...
[13:52:02.993] Using LinguiJS config { formatter: [Function: formatter] }
[13:53:53.710]  ✓ Compiled successfully
[13:53:53.717]    Linting and checking validity of types ...
[13:54:01.946] 
[13:54:01.947] ./app/[lang]/(public)/user-case/page.tsx
[13:54:01.948] 266:115  Warning: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.  jsx-a11y/alt-text
[13:54:01.948] 284:115  Warning: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.  jsx-a11y/alt-text
[13:54:01.948] 302:115  Warning: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.  jsx-a11y/alt-text
[13:54:01.948] 320:115  Warning: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.  jsx-a11y/alt-text
[13:54:01.948] 
[13:54:01.949] ./components/before-after/index.tsx
[13:54:01.949] 57:6  Warning: React Hook useEffect has a missing dependency: 'refContainer'. Either include it or remove the dependency array. Mutable values like 'imagesLoadedRef.current' aren't valid dependencies because mutating them doesn't re-render the component.  react-hooks/exhaustive-deps
[13:54:01.949] 63:6  Warning: React Hook useEffect has a missing dependency: 'onReady'. Either include it or remove the dependency array. If 'onReady' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps
[13:54:01.949] 88:6  Warning: React Hook useEffect has missing dependencies: 'firstImageRef', 'onImageLoad', 'onMouseUpHandler', and 'updateContainerWidth'. Either include them or remove the dependency array. If 'updateContainerWidth' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps
[13:54:01.949] 100:6  Warning: React Hook useEffect has missing dependencies: 'callback' and 'withResizeFeel'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
[13:54:01.950] 180:6  Warning: React Hook useEffect has a missing dependency: 'observer'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[13:54:01.950] 
[13:54:01.950] ./components/wegic/hero.tsx
[13:54:01.950] 75:15  Warning: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.  jsx-a11y/alt-text
[13:54:01.950] 88:13  Warning: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.  jsx-a11y/alt-text
[13:54:01.951] 
[13:54:01.951] info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
[13:54:15.975]    Collecting page data ...
[13:54:17.396] allLang [ { lang: 'en' }, { lang: 'zh-TW' } ]
[13:54:21.280]    Generating static pages (0/21) ...
[13:54:22.445]    Generating static pages (5/21) 
[13:54:23.325]    Generating static pages (10/21) 
[13:54:24.086]    Generating static pages (15/21) 
[13:54:25.911]  ✓ Generating static pages (21/21)
[13:54:26.273]    Finalizing page optimization ...
[13:54:26.274]    Collecting build traces ...
[13:54:37.571] 
[13:54:37.592] Route (app)                                                                       Size     First Load JS
[13:54:37.593] ┌ ○ /_not-found                                                                   880 B          88.3 kB
[13:54:37.593] ├ ● /[lang]                                                                       2.81 kB         244 kB
[13:54:37.593] ├   ├ /en
[13:54:37.593] ├   └ /zh-TW
[13:54:37.593] ├ ƒ /[lang]/about/privacy-policy                                                  157 B          87.6 kB
[13:54:37.594] ├ ● /[lang]/ai-image-extender                                                     2.84 kB         244 kB
[13:54:37.594] ├   ├ /en/ai-image-extender
[13:54:37.594] ├   └ /zh-TW/ai-image-extender
[13:54:37.594] ├ ● /[lang]/ai-photo-extender                                                     2.84 kB         244 kB
[13:54:37.594] ├   ├ /en/ai-photo-extender
[13:54:37.594] ├   └ /zh-TW/ai-photo-extender
[13:54:37.595] ├ ● /[lang]/blogs                                                                 839 B          97.6 kB
[13:54:37.595] ├   ├ /en/blogs
[13:54:37.595] ├   └ /zh-TW/blogs
[13:54:37.595] ├ ● /[lang]/blogs/[slug]                                                          190 B          99.5 kB
[13:54:37.595] ├   ├ /en/blogs/exploring-the-magic-of-ai-technology-to-extend-images-creatively
[13:54:37.595] ├   ├ /en/blogs/revolutionizing-image-editing-magic-ai-photo-outpainting-free
[13:54:37.596] ├   ├ /zh-TW/blogs/exploring-ai-technology-magic-extend-images-creatively
[13:54:37.596] ├   └ /zh-TW/blogs/revolutionizing-image-editing-magic-ai-photo-outpainting-free
[13:54:37.596] ├ ƒ /[lang]/details/[...slug]                                                     157 B          87.6 kB
[13:54:37.596] ├ ƒ /[lang]/editor                                                                85.8 kB         573 kB
[13:54:37.596] ├ ƒ /[lang]/explore                                                               157 B          87.6 kB
[13:54:37.597] ├ ƒ /[lang]/faq                                                                   157 B          87.6 kB
[13:54:37.597] ├ ● /[lang]/generative-fill-ai                                                    2.85 kB         244 kB
[13:54:37.597] ├   ├ /en/generative-fill-ai
[13:54:37.597] ├   └ /zh-TW/generative-fill-ai
[13:54:37.597] ├ ƒ /[lang]/og                                                                    0 B                0 B
[13:54:37.597] ├ ƒ /[lang]/playgroundv1/[[...slug]]                                              20.2 kB         444 kB
[13:54:37.597] ├ ƒ /[lang]/pricing                                                               4.58 kB         260 kB
[13:54:37.598] ├ ƒ /[lang]/signin                                                                11.3 kB         104 kB
[13:54:37.598] ├ ƒ /[lang]/user-case                                                             157 B          87.6 kB
[13:54:37.598] ├ ƒ /api/auth/[...nextauth]                                                       0 B                0 B
[13:54:37.598] ├ ƒ /api/cos                                                                      0 B                0 B
[13:54:37.598] ├ ƒ /api/dict-data                                                                0 B                0 B
[13:54:37.598] ├ ƒ /api/order/[[...slug]]                                                        0 B                0 B
[13:54:37.598] ├ ƒ /api/payment/[...path]                                                        0 B                0 B
[13:54:37.599] ├ ƒ /api/s34r2                                                                    0 B                0 B
[13:54:37.599] ├ ƒ /api/trade/[[...path]]                                                        0 B                0 B
[13:54:37.599] ├ ƒ /api/user                                                                     0 B                0 B
[13:54:37.599] └ ○ /robots.txt                                                                   0 B                0 B
[13:54:37.599] + First Load JS shared by all                                                     87.4 kB
[13:54:37.599]   ├ chunks/8966-8c9e3f84b041001c.js                                               31.8 kB
[13:54:37.599]   ├ chunks/fd9d1056-6d9da4ecb1454d30.js                                           53.6 kB
[13:54:37.599]   └ other shared chunks (total)                                                   1.98 kB
[13:54:37.600] 
[13:54:37.600] 
[13:54:37.600] ƒ Middleware                                                                      84 kB
[13:54:37.600] 
[13:54:37.600] ○  (Static)   prerendered as static content
[13:54:37.600] ●  (SSG)      prerendered as static HTML (uses getStaticProps)
[13:54:37.601] ƒ  (Dynamic)  server-rendered on demand
[13:54:37.601] 
[13:54:37.829] Done in 164.61s.
[13:54:37.990] Traced Next.js server files in: 54.049ms
[13:54:40.061] Warning: Max serverless function size of 250 MB uncompressed almost reached
[13:54:40.064] Serverless Function's page: [lang]/editor.js
[13:54:40.067] Large Dependencies           Uncompressed size
[13:54:40.068] node_modules/canvas/build            178.98 MB
[13:54:40.068] node_modules/.prisma/client           64.32 MB
[13:54:40.068] .next/server/chunks                    2.82 MB
[13:54:40.068] node_modules/next/dist                 1.04 MB
[13:54:40.069] node_modules/react-dom/cjs           545.26 KB
[13:54:40.069] 
[13:54:40.069] All dependencies                      248.7 MB
[13:54:40.126] Created all serverless functions in: 2.136s
[13:54:40.226] Collected static files (public/, static/, .next/static): 14.921ms
[13:54:40.351] Build Completed in /vercel/output [5m]
[13:54:40.571] Deploying outputs...
[13:55:06.285] Error: A Serverless Function has exceeded the unzipped maximum size of 250 MB. : https://vercel.link/serverless-function-size
[13:55:09.159] 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant