Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

CLI option control error stack - all, some, filter etc #7

@sanjarcode

Description

@sanjarcode

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

Example

NODE_OPTIONS='--trace-warnings --stack-trace-limit=100000' node app.js

Note: this may impact performance. Use with caution

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions