next build stuck on "Checking validity of types..."
See original GitHub issueWhat version of Next.js are you using?
12.0.3
What version of Node.js are you using?
16.11.0
What browser are you using?
Chrome
What operating system are you using?
Linux
How are you deploying your application?
Vercel
Describe the Bug
next build keeps getting stuck on " Checking validity of types…" forever. I tried downgrading next’s version to 10.1.3 (my previous project uses this version and the build command works) but it still has the same issue.
Expected Behavior
next build should generate the build files.
To Reproduce
- Clone this repo
- cd into the client directory and run
yarn build
(make sureignoreBuildErrors
is set to false in the next config) The console shows "Checking validity of types… "
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Next Build hangs forever - Stack Overflow
Removed all of them and next build runs ... I was testing using v8.12.2 and it always keep in "Checking validity of types"....
Read more >Ignoring TypeScript Errors - next.config.js
js fails your production build ( next build ) when TypeScript errors are present in your project. If you'd like Next.js to dangerously...
Read more >Catch TypeScript Errors in Next.js Before Building Your App
A manual solution. One solution is to remember to manually run next build before every git commit, because next build seems to catch...
Read more >Consistently fails to deploy to Vercel. Checks "validity of types ...
Consistently fails to deploy to Vercel. Checks "validity of types" and then says "Failed to compile" : r/nextjs.
Read more >Troubleshooting CI/CD - GitLab Docs
CI/CD troubleshooting rails console commands · Cancel stuck pending pipelines · Try merge request integration · Validate the .gitlab-ci.yml file · Disable ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We tried profiling the build process in terms of both memory and CPU usage first which showed unusual numbers, but we couldn’t figure out where the issue was.
So I started manually trying to remove all file files first, and slowly adding them back until it froze the build process. At the end, whenever I toggled that extends, I could reproduce the problem consistently.
I saw your post on mui. I recommend you give them as much information as possible in the description itself to help them help you much faster.
Hi @karan316 upon inspection, I have found multiple errors that would fail the compilation:
What freezes up the type checking though seems to be coming from here, when
extends MaterialButtonProps
is used:https://github.com/karan316/Placement-Portal/blob/dabe17073c5d4267be8feb3c0cedcf5b2fd5701c/client/components/Button/index.tsx#L2-L10
I’m not really sure yet why that would be an issue, as changing the marked section to this will pass the type checking:
I recommend you post this at https://github.com/mui-org/material-ui as well and link back to this issue. They might have an idea of why this is happening.