Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

/bin/sh not found -- spawnSync

after executing a command with execSync which executes with sh I noticed the following:

spawnSync /bin/sh ENOENT

bin is currently added to PATH.

any thoughts?

like image 902
Drew Avatar asked Aug 23 '26 11:08

Drew


2 Answers

Normally the cause is that the path where you are executing this doesn't exist

see the accepted answer in this question

How do I debug “Error: spawn ENOENT” on node.js?

like image 60
stalin Avatar answered Aug 26 '26 02:08

stalin


This error can also be caused by passing a directory that does not exist to the cwd. Double check that the path you are passing as the cwd option is correct.

like image 23
Code Commander Avatar answered Aug 26 '26 00:08

Code Commander



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!