How do you run nx serve with node --trace-warnings?

Viewed 3569

I start my app with

yarn nx serve my-api

There is an error in the build of an unknown origin that is being obfuscated by node. The console output says "Use node --trace-warnings ... to show where the warning was created". How do I run yarn nx serve in conjunction with --trace-warnings? I want to get the stack trace so that I can find my error.

1 Answers

node --trace-warnings node_modules/.bin/nx serve my-api

Alternatively, you could include this code within your application:

process.on('warning', e => console.warn(e.stack));
Related