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

The deploy of my branch, with the upgrade to NextJs 15, failed. #74391

Closed
TheThirdRace opened this issue Dec 29, 2024 · 1 comment
Closed

The deploy of my branch, with the upgrade to NextJs 15, failed. #74391

TheThirdRace opened this issue Dec 29, 2024 · 1 comment
Labels
invalid link The issue was auto-closed due to a missing/invalid reproduction link. A new issue should be opened.

Comments

@TheThirdRace
Copy link

          The deploy of my branch, with the upgrade to NextJs 15, failed.

Apparently, not only the build now is 2x as long, but somehow 2 serverless functions are busting the size limit 🤔

Looking at the logs (will share at the end), I can see a few weird things:

  1. Some elements should not be part of the build, don't know why they're included:
    • For some reason, git files seem to be included in the bundle
      • [16:45:16.307] .git/objects/pack 151.67 MB
    • The original images are kept in a folder as "documentation", I don't reference them anywhere in the code but they're somehow included in the bundle
      • [16:45:16.307] src/private/img 144.25 MB
    • All public/ folder images are bundled in the serverless function, even though only a few are actually used in the page. I always use a direct path for import, so there's no barrel file anywhere
      • [16:45:16.307] public/img/mass-effect-andromeda 36.43 MB
      • [16:45:16.308] node_modules/next/dist 8.13 MB
      • [16:45:16.308] public/img/site 7.4 MB
      • [16:45:16.308] public/img/dark-souls-3 5.77 MB
      • [16:45:16.308] public/img/skyrim 4.51 MB

Here's the complete log:

[16:42:50.910] Running build in Washington, D.C., USA (East) – iad1
[16:42:51.085] Cloning github.com/TheThirdRace/thethirdrace.com (Branch: chore/update-nextjs-15-1-3, Commit: a71c155)
[16:42:51.703] Previous build caches not available
[16:42:56.008] Cloning completed: 4.927s
[16:42:56.537] Running "vercel build"
[16:42:56.952] Vercel CLI 39.2.0
[16:42:57.563] Installing dependencies...
[16:42:57.903] yarn install v1.22.19
[16:42:57.982] [1/5] Validating package.json...
[16:42:57.985] [2/5] Resolving packages...
[16:42:58.366] [3/5] Fetching packages...
[16:43:28.638] [4/5] Linking dependencies...
[16:43:28.657] warning " > @chakra-ui/theme-tools@2.1.2" has unmet peer dependency "@chakra-ui/styled-system@>=2.0.0".
[16:43:41.501] [5/5] Building fresh packages...
[16:43:41.696] Done in 43.80s.
[16:43:41.736] Detected Next.js version: 15.1.3
[16:43:41.738] Running "yarn run build"
[16:43:41.925] yarn run v1.22.19
[16:43:41.948] $ node ./script/generateSitemap.mjs
[16:43:42.066] �[35mevent�[0m - Generating sitemap
[16:43:42.085]     �[32m/�[0m
[16:43:42.086]     �[32m/404�[0m
[16:43:42.086]     �[32m/500�[0m
[16:43:42.086]     �[32m/blog�[0m
[16:43:42.086]     �[32m/blog/2020-05-08-initial�[0m
[16:43:42.087]     �[32m/blog/2020-06-30-after-a-month�[0m
[16:43:42.087]     �[32m/blog/2021-01-22-typography�[0m
[16:43:42.087]     �[32m/contribute�[0m
[16:43:42.087]     �[32m/games/mass-effect-andromeda/multiplayer-build-list�[0m
[16:43:42.087]     �[32m/games/mass-effect-andromeda/multiplayer-character-builder�[0m
[16:43:42.087]     �[32m/games/mass-effect-andromeda/single-player-mod-list�[0m
[16:43:42.088]     �[32m/games/skyrim/master-trader�[0m
[16:43:42.088]     �[32m/games/skyrim/master-trader-se�[0m
[16:43:42.088]     �[32m/games/skyrim/oghma-infinium�[0m
[16:43:42.088]     �[32m/games/skyrim/ttrso�[0m
[16:43:42.088]     �[32m/games/skyrim/ziil-los-dii-du�[0m
[16:43:42.088]     �[32m/legal�[0m
[16:43:42.089]     �[32m/news�[0m
[16:43:42.089]     �[32m/news/2�[0m
[16:43:42.089]     �[32m/news/3�[0m
[16:43:42.089]     �[32m/news/4�[0m
[16:43:42.089]     �[32m/news/5�[0m
[16:43:42.089]     �[32m/news/6�[0m
[16:43:42.089]     �[32m/news/7�[0m
[16:43:42.089]     �[32m/news/8�[0m
[16:43:42.089]     �[32m/news/9�[0m
[16:43:42.096] $ next build
[16:43:42.878] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[16:43:42.879] This information is used to shape Next.js' roadmap and prioritize features.
[16:43:42.879] 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:
[16:43:42.879] https://nextjs.org/telemetry
[16:43:42.879] 
[16:43:42.957]    ▲ Next.js 15.1.3
[16:43:42.958] 
[16:43:43.009]    Skipping validation of types
[16:43:43.010]    Skipping linting
[16:43:43.401]    Creating an optimized production build ...
[16:44:47.177]  ✓ Compiled successfully
[16:44:47.182]    Collecting page data ...
[16:44:51.790]    Generating static pages (0/27) ...
[16:44:55.185]    Generating static pages (6/27) 
[16:44:56.511]    Generating static pages (13/27) 
[16:44:57.543]    Generating static pages (20/27) 
[16:44:57.544]  ✓ Generating static pages (27/27)
[16:45:08.569]    Finalizing page optimization ...
[16:45:08.569]    Collecting build traces ...
[16:45:12.784] 
[16:45:12.796] Route (pages)                                                                                                  Size     First Load JS
[16:45:12.796] ┌ ○ / (2854 ms)                                                                                                1.31 kB         228 kB
[16:45:12.796] ├   /_app                                                                                                      0 B             226 kB
[16:45:12.797] ├ ○ /404 (2859 ms)                                                                                             1.1 kB          238 kB
[16:45:12.797] ├ ● /500 (2859 ms)                                                                                             1.12 kB         238 kB
[16:45:12.797] ├ ○ /anniversary/[[...anniversary]] (2853 ms)                                                                  8.67 kB         243 kB
[16:45:12.797] ├ ƒ /api/error                                                                                                 0 B             226 kB
[16:45:12.797] ├ ƒ /api/import                                                                                                0 B             226 kB
[16:45:12.797] ├ ƒ /api/payment/[[...payment]]                                                                                0 B             226 kB
[16:45:12.797] ├ ƒ /api/urls/[[...short-url]]                                                                                 0 B             226 kB
[16:45:12.798] ├ ● /blog/[[...blog]] (6793 ms)                                                                                2.25 kB         239 kB
[16:45:12.798] ├   ├ /blog (2859 ms)
[16:45:12.798] ├   ├ /blog/2020-05-08-initial (1312 ms)
[16:45:12.798] ├   ├ /blog/2020-06-30-after-a-month (1311 ms)
[16:45:12.798] ├   └ /blog/2021-01-22-typography (1311 ms)
[16:45:12.798] ├ ● /contribute/[[...contribute]] (1310 ms)                                                                    8.91 kB         259 kB
[16:45:12.798] ├   └ /contribute (1310 ms)
[16:45:12.798] ├ ○ /games/mass-effect-andromeda/multiplayer-build-list/[[...multiplayer-build-list]] (2854 ms)                20 kB           254 kB
[16:45:12.798] ├ ○ /games/mass-effect-andromeda/multiplayer-character-builder/[[...multiplayer-character-builder]] (2849 ms)  18.4 kB         258 kB
[16:45:12.798] ├ ○ /games/mass-effect-andromeda/single-player-mod-list/[[...single-player-mod-list]] (2855 ms)                6.62 kB         244 kB
[16:45:12.798] ├ ● /games/skyrim/master-trader-se/[[...master-trader-se]] (1307 ms)                                           993 B           238 kB
[16:45:12.798] ├   └ /games/skyrim/master-trader-se (1307 ms)
[16:45:12.798] ├ ● /games/skyrim/master-trader/[[...master-trader]] (1306 ms)                                                 955 B           238 kB
[16:45:12.798] ├   └ /games/skyrim/master-trader (1306 ms)
[16:45:12.798] ├ ● /games/skyrim/oghma-infinium/[[...oghma-infinium]] (1306 ms)                                               952 B           238 kB
[16:45:12.798] ├   └ /games/skyrim/oghma-infinium (1306 ms)
[16:45:12.798] ├ ● /games/skyrim/ttrso/[[...ttrso]] (1305 ms)                                                                 1 kB            238 kB
[16:45:12.798] ├   └ /games/skyrim/ttrso (1305 ms)
[16:45:12.798] ├ ● /games/skyrim/ziil-los-dii-du/[[...ziil-los-dii-du]] (729 ms)                                              950 B           238 kB
[16:45:12.798] ├   └ /games/skyrim/ziil-los-dii-du (729 ms)
[16:45:12.798] ├ ● /legal/[[...legal]] (729 ms)                                                                               1.38 kB         238 kB
[16:45:12.798] ├   └ /legal (729 ms)
[16:45:12.798] └ ● /news/[[...news]] (4989 ms)                                                                                2.15 kB         239 kB
[16:45:12.798]     ├ /news (728 ms)
[16:45:12.798]     ├ /news/3 (728 ms)
[16:45:12.798]     ├ /news/4 (728 ms)
[16:45:12.798]     ├ /news/2 (727 ms)
[16:45:12.798]     ├ /news/5 (727 ms)
[16:45:12.798]     ├ /news/6 (727 ms)
[16:45:12.798]     ├ /news/7
[16:45:12.799]     └ [+2 more paths]
[16:45:12.799] + First Load JS shared by all                                                                                  226 kB
[16:45:12.799]   ├ chunks/framework-19baaf6675f9027b.js                                                                       44.8 kB
[16:45:12.799]   ├ chunks/main-a0c8126736e23788.js                                                                            38.1 kB
[16:45:12.799]   ├ chunks/pages/_app-bdacf1bfa4e14c11.js                                                                      140 kB
[16:45:12.799]   └ other shared chunks (total)                                                                                3.27 kB
[16:45:12.799] 
[16:45:12.799] ƒ Middleware                                                                                                   49.1 kB
[16:45:12.799] 
[16:45:12.799] ○  (Static)   prerendered as static content
[16:45:12.799] ●  (SSG)      prerendered as static HTML (uses getStaticProps)
[16:45:12.799] ƒ  (Dynamic)  server-rendered on demand
[16:45:12.802] 
[16:45:12.924] Done in 91.00s.
[16:45:13.134] Traced Next.js server files in: 145.984ms
[16:45:16.299] Warning: Max serverless function size of 250 MB uncompressed reached
[16:45:16.300] Serverless Function's page: blog/[[...blog]].js
[16:45:16.307] Large Dependencies                Uncompressed size
[16:45:16.307] .git/objects/pack                         151.67 MB
[16:45:16.307] src/private/img                           144.25 MB
[16:45:16.307] public/img/mass-effect-andromeda           36.43 MB
[16:45:16.308] node_modules/next/dist                      8.13 MB
[16:45:16.308] public/img/site                              7.4 MB
[16:45:16.308] public/img/dark-souls-3                     5.77 MB
[16:45:16.308] public/img/skyrim                           4.51 MB
[16:45:16.308] src/pages/games                             2.39 MB
[16:45:16.308] node_modules/react-dom/cjs                  1.64 MB
[16:45:16.309] .next/trace                                 1.62 MB
[16:45:16.309] public/favicon/archive                      1.04 MB
[16:45:16.309] node_modules/framer-motion/dist           912.12 KB
[16:45:16.309] 
[16:45:16.309] All dependencies                          372.06 MB
[16:45:16.311] Serverless Function's page: news/[[...news]].js
[16:45:16.315] Large Dependencies                Uncompressed size
[16:45:16.315] .git/objects/pack                         151.67 MB
[16:45:16.315] src/private/img                           144.25 MB
[16:45:16.315] public/img/mass-effect-andromeda           36.43 MB
[16:45:16.316] node_modules/next/dist                      8.13 MB
[16:45:16.316] public/img/site                              7.4 MB
[16:45:16.316] public/img/dark-souls-3                     5.77 MB
[16:45:16.316] public/img/skyrim                           4.51 MB
[16:45:16.316] src/pages/games                             2.39 MB
[16:45:16.317] node_modules/react-dom/cjs                  1.64 MB
[16:45:16.317] .next/trace                                 1.62 MB
[16:45:16.317] public/favicon/archive                      1.04 MB
[16:45:16.317] node_modules/framer-motion/dist           912.12 KB
[16:45:16.317] 
[16:45:16.317] All dependencies                          372.06 MB
[16:45:16.319] Max serverless function size was exceeded for 2 functions
[16:45:16.325] Created all serverless functions in: 3.191s
[16:45:16.523] Collected static files (public/, static/, .next/static): 80.061ms
[16:45:16.732] Build Completed in /vercel/output [2m]
[16:45:17.181] Deploying outputs...
[16:45:35.142] Failed to process build result for "_next/data/F4ZmMRSZHT9oMSGyCEqTN/blog.json". Data: {"type":"Prerender"}.
[16:45:35.143] Failed to process build result for "_next/data/F4ZmMRSZHT9oMSGyCEqTN/blog/2020-05-08-initial.json". Data: {"type":"Prerender"}.
[16:45:35.143] Failed to process build result for "_next/data/F4ZmMRSZHT9oMSGyCEqTN/blog/2020-06-30-after-a-month.json". Data: {"type":"Prerender"}.
[16:45:35.144] Failed to process build result for "blog". Data: {"type":"Prerender"}.
[16:45:35.144] Failed to process build result for "blog/2020-05-08-initial". Data: {"type":"Prerender"}.
[16:45:35.144] Failed to process build result for "blog/2020-06-30-after-a-month". Data: {"type":"Prerender"}.
[16:45:35.144] Failed to process build result for "_next/data/F4ZmMRSZHT9oMSGyCEqTN/blog/2021-01-22-typography.json". Data: {"type":"Prerender"}.
[16:45:35.144] Failed to process build result for "blog/2021-01-22-typography". Data: {"type":"Prerender"}.
[16:45:35.144] Failed to process build result for "_next/data/F4ZmMRSZHT9oMSGyCEqTN/blog/[[...blog]].json". Data: {"type":"Prerender"}.
[16:45:35.145] Failed to process build result for "blog/[[...blog]]". Data: {"type":"Prerender"}.
[16:45:35.149] Error: The Serverless Function "_next/data/F4ZmMRSZHT9oMSGyCEqTN/blog.json" is 355.77mb which exceeds the maximum size limit of 300mb. Learn More: https://vercel.link/serverless-function-size
[16:45:37.574] 

Originally posted by @TheThirdRace in #60754 (comment)

Copy link
Contributor

We could not detect a valid reproduction link. Make sure to follow the bug report template carefully.

Why was this issue closed?

To be able to investigate, we need access to a reproduction to identify what triggered the issue. We need a link to a public GitHub repository (template for App Router, template for Pages Router), but you can also use these templates: CodeSandbox: App Router or CodeSandbox: Pages Router.

The bug template that you filled out has a section called "Link to the code that reproduces this issue", which is where you should provide the link to the reproduction.

  • If you did not provide a link or the link you provided is not valid, we will close the issue.
  • If you provide a link to a private repository, we will close the issue.
  • If you provide a link to a repository but not in the correct section, we will close the issue.

What should I do?

Depending on the reason the issue was closed, you can do the following:

  • If you did not provide a link, please open a new issue with a link to a reproduction.
  • If you provided a link to a private repository, please open a new issue with a link to a public repository.
  • If you provided a link to a repository but not in the correct section, please open a new issue with a link to a reproduction in the correct section.

In general, assume that we should not go through a lengthy onboarding process at your company code only to be able to verify an issue.

My repository is private and cannot make it public

In most cases, a private repo will not be a sufficient minimal reproduction, as this codebase might contain a lot of unrelated parts that would make our investigation take longer. Please do not make it public. Instead, create a new repository using the templates above, adding the relevant code to reproduce the issue. Common things to look out for:

  • Remove any code that is not related to the issue. (pages, API routes, components, etc.)
  • Remove any dependencies that are not related to the issue.
  • Remove any third-party service that would require us to sign up for an account to reproduce the issue.
  • Remove any environment variables that are not related to the issue.
  • Remove private packages that we do not have access to.
  • If the issue is not related to a monorepo specifically, try to reproduce the issue without a complex monorepo setup

I did not open this issue, but it is relevant to me, what can I do to help?

Anyone experiencing the same issue is welcome to provide a minimal reproduction following the above steps by opening a new issue.

I think my reproduction is good enough, why aren't you looking into it quickly?

We look into every Next.js issue and constantly monitor open issues for new comments.

However, sometimes we might miss one or two due to the popularity/high traffic of the repository. We apologize, and kindly ask you to refrain from tagging core maintainers, as that will usually not result in increased priority.

Upvoting issues to show your interest will help us prioritize and address them as quickly as possible. That said, every issue is important to us, and if an issue gets closed by accident, we encourage you to open a new one linking to the old issue and we will look into it.

Useful Resources

@github-actions github-actions bot added the invalid link The issue was auto-closed due to a missing/invalid reproduction link. A new issue should be opened. label Dec 29, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Dec 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid link The issue was auto-closed due to a missing/invalid reproduction link. A new issue should be opened.
Projects
None yet
Development

No branches or pull requests

1 participant