You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Node.js is not printing the full error stack trace, only traces inside of node_modules are being print, and so I cannot see my app code. Is there a CLI option in Node.js to print the whole stack trace, unfiltered
— Sanjar
By default Node.js limits the number of stack trace lines that are printed to the console. However, you can increase the stack trace limit by setting the NODE_OPTIONS environment variable when running your Node.js application.
To print the full stack trace, you can set --trace-warnings and --stack-trace-limit=100000 flags in NODE_OPTIONS environment variable.
— ChatGPT
How to force traces to have relative path based on project path, instead of absolute paths
Exclude node_modules traces, or limit them to a small number
sanjarcode
changed the title
CLI option to print the full stack trace, unfiltered
CLI option to print the full error stack trace, unfiltered
Oct 6, 2023
Optional: you change the value (zero here). Negative values print less, and positive prints more. For example - setting to 10 will print only the first 10 node_modules errors.
Optional: You can replace 100000 to set the limit.
has some issues, will fix
sanjarcode
changed the title
CLI option to print the full error stack trace, unfiltered
CLI option control error stack - all, some, filter etc
Dec 9, 2023
Example
NODE_OPTIONS='--trace-warnings --stack-trace-limit=100000' node app.js
Note: this may impact performance. Use with caution
The text was updated successfully, but these errors were encountered: