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

next build freezes right after npm:load #32399

Closed
ntd opened this issue Dec 11, 2021 · 4 comments
Closed

next build freezes right after npm:load #32399

ntd opened this issue Dec 11, 2021 · 4 comments
Labels
bug Issue was opened via the bug report template.

Comments

@ntd
Copy link

ntd commented Dec 11, 2021

What version of Next.js are you using?

12.0.7

What version of Node.js are you using?

16.13.1

What browser are you using?

Irrelevant

What operating system are you using?

ArchLinux

How are you deploying your application?

Irrelevant

Describe the Bug

Whenever I trigger a npm run build command, the node process hogs one core of my CPU and it freezes indefinitely. npm run dev works fine.

After a npm install next@canary, the outcome did not change.

Expected Behavior

An error message or a successful build.

To Reproduce

The project is public, so you can clone it:

git clone https://github.com/ntd/adg.entidi.com.git -b issue-32399
cd adg.entidi.com
npm install
npm run build --verbose

And this is what I get:

npm verb cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build', '--verbose' ]
npm info using npm@8.3.0
npm info using node@v16.13.1
[ ... snip ...]

> build
> next build

(( ...emtpy... )) timing npm:load Completed in 21ms

... then the spinner stops and I cannot exit with CtrlC (I need to send a SIGKILL to the node process).

@ntd ntd added the bug Issue was opened via the bug report template. label Dec 11, 2021
@ntd
Copy link
Author

ntd commented Dec 12, 2021

I just reduced my testcase. The following code triggers the issue:

import { visit } from 'unist-util-visit'
visit(whatever, '2', (node, _, parent) => {})

The full repository with the above code in lib/api.ts is in the issue-32399 branch.

@balazsorban44
Copy link
Member

balazsorban44 commented Dec 13, 2021

Duplicate of #32139

This is a bug in TypeScript. #32193 (comment)

@ntd
Copy link
Author

ntd commented Dec 13, 2021

Upstream bug report: microsoft/TypeScript#46900

@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

2 participants