Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix
NODE_OPTIONS
env forwarding (#11587)
I got this error when executing `Run Dev Server` on the VScode ``` api | Waiting for the debugger to disconnect... api | node:events:497 api | throw er; // Unhandled 'error' event api | ^ api | api | Error: spawn Studio ENOENT api | at ChildProcess._handle.onexit (node:internal/child_process:286:19) api | at onErrorNT (node:internal/child_process:484:16) api | at process.processTicksAndRejections (node:internal/process/task_queues:82:21) api | Emitted 'error' event on ChildProcess instance at: api | at ChildProcess._handle.onexit (node:internal/child_process:292:12) api | at onErrorNT (node:internal/child_process:484:16) api | at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { api | errno: -2, api | code: 'ENOENT', api | syscall: 'spawn Studio', api | path: 'Studio', api | spawnargs: [ api | 'Code.app/Contents/Resources/app/extensions/ms-vscode.js-debug/src/bootloader.js --inspect-publish-uid=http --enable-source-maps', api | 'yarn', api | 'nodemon', api | '--quiet', api | '--watch', api | '/Users/tim/Workspace/src/github.com/daangn/activity-badge-admin/redwood.toml', api | '--exec', api | 'yarn rw-api-server-watch --port 8911 --debug-port 18911 | rw-log-formatter' api | ] api | } ``` Because the VSCode debugger injects this env variable, ``` --require "/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.js-debug/src/bootloader.js" --inspect-publish-uid=http ``` But not escaped correctly ``` yarn cross-env NODE_ENV=development NODE_OPTIONS="--require "/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.js-debug/src/bootloader.js" --inspect-publish-uid=http --enable-source-maps" yarn nodemon --quiet --watch "/Users/tim/Workspace/src/github.com/daangn/activity-badge-admin/redwood.toml" --exec "yarn rw-api-server-watch --port 8911 --debug-port 18911 | rw-log-formatter" exited with code 1 ``` --------- Co-authored-by: Josh GM Walker <56300765+Josh-Walker-GM@users.noreply.github.com>
- Loading branch information