Search code examples
node.jsnestjs

How to pass a NodeJS parameter to NestJS to extend the stack trace


I must pass the node parameter --stack_trace_limit=200 to NestJS to show an extended trace. I want to continue using nest-cli for development reasons. It seems that NestJS does not proxify NodeJS parameters to NodeJS.

Regards.


Solution

  • One way would be to use NODE_OPTIONS variable, NodeJS's runtime will pick it up.

    For example:

    NODE_OPTIONS="--stack_trace_limit=200" nest start