vercel / next.js

The React Framework
https://nextjs.org
MIT License
126.98k stars 26.98k forks source link

The latest next.js 13.5.2 version takes ~20x longer to build and push to production (compared to 13.4.19) #55709

Closed MartinXPN closed 1 year ago

MartinXPN commented 1 year ago

Link to the code that reproduces this issue

https://github.com/MartinXPN/profound.academy

To Reproduce

yarn build && yarn start

Current vs. Expected behavior

It used to take me ~2m to build the whole app (both locally and on Vercel). It takes ~40m to do that now.

Verify canary release

Provide environment information

Operating System:
      Platform: darwin
      Arch: x64
      Version: Darwin Kernel Version 21.6.0: Thu Jul  6 22:18:26 PDT 2023; root:xnu-8020.240.18.702.13~1/RELEASE_X86_64
    Binaries:
      Node: 18.17.0
      npm: 9.6.7
      Yarn: 1.22.19
      pnpm: N/A
    Relevant Packages:
      next: 13.5.2
      eslint-config-next: 13.5.2
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.2.2
    Next.js Config:
      output: N/A

Which area(s) are affected? (Select all that apply)

App Router

Additional context

Here is my package.json dependencies:

{
  "private": true,
  "dependencies": {
    "@emotion/cache": "^11.11.0",
    "@emotion/css": "^11.11.0",
    "@emotion/react": "^11.11.0",
    "@emotion/server": "^11.11.0",
    "@emotion/styled": "^11.11.0",
    "@hookform/resolvers": "^3.1.1",
    "@matejmazur/react-katex": "^3.1.3",
    "@mui/icons-material": "^5.14.9",
    "@mui/lab": "^5.0.0-alpha.145",
    "@mui/material": "^5.14.10",
    "@mui/x-date-pickers": "^6.14.0",
    "@svgr/webpack": "^8.1.0",
    "ace-builds": "^1.27.0",
    "algoliasearch": "^4.20.0",
    "axios": "^1.5.0",
    "clipboard-copy": "^4.0.1",
    "cookies-next": "^4.0.0",
    "encoding": "^0.1.13",
    "firebase": "^10.4.0",
    "firebase-admin": "^11.10.1",
    "firebaseui": "^6.1.0",
    "katex": "^0.16.8",
    "models": "file:functions/src/models",
    "moment": "^2.29.4",
    "next": "^13.5.2",
    "next-axiom": "^1.0.0",
    "next-firebase-auth-edge": "0.8.7-1",
    "notion-client": "^6.16.0",
    "notion-types": "^6.16.0",
    "prismjs": "^1.29.0",
    "react": "^18.2.0",
    "react-ace": "^10.1.0",
    "react-calendar-heatmap": "^1.9.0",
    "react-countdown": "^2.3.5",
    "react-dom": "^18.2.0",
    "react-drag-drop-files": "^2.3.10",
    "react-hook-form": "^7.46.1",
    "react-hotkeys-hook": "^4.4.1",
    "react-intersection-observer": "^9.5.2",
    "react-localization": "^1.0.19",
    "react-markdown": "^8.0.7",
    "react-multi-split-pane": "^0.3.3",
    "react-notion-x": "^6.16.0",
    "react-slick": "^0.29.0",
    "react-spring": "^9.7.2",
    "recharts": "^2.8.0",
    "sharp": "^0.32.6",
    "slick-carousel": "^1.8.1",
    "superjson": "^1.13.1",
    "typescript": "^5.2.2",
    "use-async-effect": "^2.2.7",
    "zod": "^3.22.2"
  },
  "devDependencies": {
    "@types/node": "^20.6.3",
    "@types/prismjs": "^1.26.0",
    "@types/react": "^18.2.22",
    "@types/react-calendar-heatmap": "^1.6.3",
    "@types/react-dom": "^18.2.7",
    "@types/react-slick": "^0.23.10",
    "eslint": "^8.49.0",
    "eslint-config-next": "^13.5.2"
  },
}
github-actions[bot] commented 1 year ago

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.

What should I do?

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

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:

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