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.

Next build stalls at Checking validity of types...

See original GitHub issue

What version of Next.js are you using?

12.0.7

What version of Node.js are you using?

16.3.0

What browser are you using?

chrome

What operating system are you using?

macOS monterey

How are you deploying your application?

vercel

Describe the Bug

next build stalls indefinitely at info - Checking validity of types .

Expected Behavior

It shouldn’t stall, or at least give an error / exception

To Reproduce

clone https://github.com/cjroebuck/next-build-stalled

npm i
npm run build

observe that terminal locks up at info - Checking validity of types ...

In order to get the build to pass, comment out this line

This I believe is the offending file / method call:
https://github.com/cjroebuck/next-build-stalled/blob/main/src/lib/docs/remark-paragraph-alerts.ts#L27

By renaming the file to something else i.e. remark-paragraph-alerts.ts.notused, to remove it from the ts build, the build will not stall…

I assume it is an issue with the types for the unist-util-visit module, so will raise an issue over their too pointing back here.

It is strange that next build stalls, however running tsc in the directory does seem to work ok.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
balazsorban44commented, Dec 7, 2021

Seems to be reported here already: https://github.com/microsoft/TypeScript/issues/46900

1reaction
cjroebuckcommented, Dec 7, 2021

@balazsorban44 Yep I came across that issue when looking for similar issues, that’s why I made sure tsc was not having any issues before posting 😊

Read more comments on GitHub >

github_iconTop Results From Across the Web

next build stuck on "Checking validity of types" #31994 - GitHub
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...
Read more >
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
Next.js fails your production build ( next build ) when TypeScript errors are present in your project. If you'd like Next.js to ...
Read more >
Use Next.js and Vercel to build a link-sharing app using ...
The server will first check to see if the URL is valid. If so, it will look up the OpenGraph data associated with...
Read more >
Next.js | About Lovia
Troubleshooting: NextJS stuck with “build page: /next/dist/pages/_error” and “compiled successfully” ... Cause: Yarn's nodeLinker is pnp. See next ...
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