-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
Add documentation on debugging memory usage #63689
Conversation
In your terminal, pass the `--heap-prof` flag to Node.js when starting your Next.js build: | ||
|
||
```sh | ||
node --heap-prof next build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this is the right command? It's expecting a file
$ node --heap-prof next build
node:internal/modules/cjs/loader:1085
throw err;
^
Error: Cannot find module 'A:\projects\46-fleetx\apps\vendor\next'
←[90m at Module._resolveFilename (node:internal/modules/cjs/loader:1082:15)←
[39m
←[90m at Module._load (node:internal/modules/cjs/loader:928:27)←[39m
←[90m at Function.executeUserEntryPoint [as runMain] (node:internal/modules/
run_main:83:12)←[39m
←[90m at node:internal/main/run_main_module:23:47←[39m {
code: ←[32m'MODULE_NOT_FOUND'←[39m,
requireStack: []
}
Node.js v20.0.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be node --heap-prof ./node_modules/.bin/next build
depending on the package manager.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thank you. I sent #63982 to update
No description provided.