nx
nx copied to clipboard
Allow `cwd` as an option in `nx serve`
When running a node application using nx serve, the process.env() always refers to the root directory as opposed to the application directory. As a result, it's not able to locate certain files correctly.
Unfortunately, due to the way my project is set up, there's no way to hack through it. Would it be possible to include cwd as an option in the @nrwl/node:node executor?
Description
Unable to control process.cwd() which always points to the root directory.
Solution
Allow cwd as an option in nx serve, specifically in the @nrwl/node:node executor.
Thanks a lot!
Originally posted by @charlie-nik in https://github.com/nrwl/nx/issues/1194#issuecomment-1205436544