Closed mattezell closed 5 years ago
I am seeing this as well. I am using this script in my package.json file:
"build:watch": "nodemon -e js,scss,css -w src -x 'nwb build-react-component --no-demo --copy-files'",
Never mind. My issue appears to have been related to using '
to quote around my -x command and not "
which windows apparently cares about.
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. Thank you for contributing <3
Yes, this is still an issue as described.
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. Thank you for contributing <3
nodemon -v
: 1.18.3node -v
: 10.15.0Expected behaviour
When using nodemon to monitor source changes, I'd expect that node applications behave identically to how they would when running directly under node.
Actual behaviour
When using the above nodemon configuration, nested child_process.spawn calls seemingly fail with "is not recognized as an internal and external command" when 2 children deep - specifically when npm-lifecycle executes scripts, such as postinstall. I personally encountered this issue on a RESTful node build API, in which a project dependency included an opencollective postinstall script - which results in "'opencollective' is not recognized as an internal and external command"... When I bypass nodemon by directly running "node --inspect-brk -r tsconfig-paths/register -r ts-node/register src/main.ts", everything works as expected (e.g. opencollective postinstall is successfully executed).
Steps to reproduce
The easiest way that I am aware of would be to start with a copy of the nestjs starter project: https://github.com/nestjs/typescript-starter
I modified the app.controller.ts getHello method to the following:
Note: 'projectDir' needs to be a project which includes a dependency on a project which includes a postinstall script which relies on a dependency binary, such as opencollective... one such project is @compodoc/compodoc@1.1.7 (I've submitted a workaround to this project, which has been merged, so this will likely not be reproducible with this library at versions later than 1.1.7).