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