Can't exec with shell node v4
See original GitHub issueTypeError: Bad argument
at TypeError (native)
at ChildProcess.spawn (internal/child_process.js:285:26)
at ChildProcess.spawn (/usr/share/pm2/node_modules/pmx/node_modules/vxx/node_modules/continuation-local-storage/node_modules/async-listener/index.js:120:29)
at exports.spawn (child_process.js:362:9)
at Object.exports.execFile (child_process.js:151:15)
at Object.exports.exec (child_process.js:111:18)
at refreshMetrics (/home/florian/.pm2/node_modules/pm2-server-monit/lib/drive.js:10:6)
at Object.init (/home/florian/.pm2/node_modules/pm2-server-monit/lib/drive.js:100:3)
at /home/florian/.pm2/node_modules/pm2-server-monit/app.js:46:9
at Object.PMX.initModule (/home/florian/.pm2/node_modules/pmx/lib/pmx.js:116:12)
$ node -v
v4.6.2
But work correctly if {shell: true}
is not specified.
@vmarchaud @Unitech
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (3 by maintainers)
Top Results From Across the Web
nodeJS exec does not work for "cd " shell cmd - Stack Overflow
Your shell IS executing cd but it's just that each shell throws away it's working directory after it's finished. Hence you're back at...
Read more >Executing Shell Commands with Node.js - Stack Abuse
In this article, we will learn the various ways to execute shell commands in Node.js using the child_process module.
Read more >nodejs not working, exec format error #8151 - GitHub
nodejs can start if we manually invoke ld-linux, although it is already the interpreter in the ELF. wangqr@ocalhost:~$ /usr/bin/node zsh: exec ...
Read more >How to run `shell` and more using Node.js - NodeSource
The exec() method from the child_process module will spawn a shell in your machine, and that's how you run shell commands using node:...
Read more >How to Execute Shell Commands With Node.Js
This tutorial will teach you how to execute shell commands, ... return if we encounter an error console.error("could not execute command: "Β ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@altras Nothing else i think, we will investigate thanks π
Iβm still getting this error on node
v4.7.0
pm2 version:
2.8.0
logs: