Error: spawn /bin/sh ENOENT
See original GitHub issueHi,
I’m using shipit in my projects and it worked well. However, I’ve faced with strange issue and I don’t know how to fix it. I’m trying to deploy project from git repository:
$ shipit dev deploy
Running 'deploy:init' task...
Finished 'deploy:init' after 1.33 ms
Running 'deploy:fetch' task...
Create workspace...
Workspace created: "/tmp/app"
Initialize local repository in "/tmp/app"
Running "git init" on local.
'deploy:fetch' errored after 14 ms
Error: spawn /bin/sh ENOENT
at _errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
Here is my config:
var path = require('path');
module.exports = function (shipit) {
require('shipit-deploy')(shipit);
require('shipit-shared')(shipit);
shipit.initConfig({
default: {
workspace: '/tmp/app',
dirToCopy: '/tmp/app/www',
deployTo: '/var/www/public_html/app.net/www',
repositoryUrl: 'https://user@bitbucket.org/user/app.git',
branch: 'master',
ignores: ['.git', 'node_modules'],
rsync: ['--del'],
keepReleases: 3,
deleteOnRollback: false,
key: '~/.ssh/id_rsa',
shallowClone: false,
shared: {
overwrite: true,
dirs: [
{ path: 'public/photos', overwrite: true, chmod: '-R 755' }
]
}
},
dev: {
servers: 'user@192.168.1.5:22',
branch: 'develop'
},
production: {
servers: 'user@app.net:22',
branch: 'master'
}
});
shipit.on('deployed', function () {
shipit.start(['run']);
});
shipit.blTask('run', function () {
shipit.start('pm2:start');
});
shipit.blTask('pm2:start', function () {
return shipit.remote('source ~/.nvm/nvm.sh && pm2 start ' + shipit.currentPath + '/process.json');
});
};
Previously everything worked good.
$ shipit --version
4.0.2
Please help me to fix this issue.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:17 (5 by maintainers)
Top Results From Across the Web
Node Error spawn /bin/sh ENOENT on remote server
Okay, I am an idiot. The folder on my local machine is named differently from the git repo and therefore the folder on...
Read more >Error: spawnSync /bin/sh ENOENT · Issue #9644 · nodejs/node
I encounter the same error message in a Debian server, and it was due to a typo in cwd option pass to exec:...
Read more >Debugging Node's spawn ENOENT - Ethan Mick
Turns out, this error means something doesn't exist, not /bin/sh . It turns out that the cwd I was setting the command to...
Read more >Error: spawn node_modules/webpack/bin/webpack.js ENOENT
Hi I am in windows 10 when I issue the command npm run dev. it shows error. Error: spawn node_modules/webpack/bin/webpack.js ENOENT.
Read more >How to solve spawn bin/zsh ENOENT? - Unix Stack Exchange
I am installing dependencies for a project using NodeJS, Angular and Node-Sass, all goes ok when installing both Node and Angular, ...
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 Free
Top 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
Here’s the problem. The
config.workspace
is ignored when shallowClone is true and some scripts depend on that path.https://github.com/shipitjs/shipit/blob/343fa7dfb41f507492eca315ceda52eaa1e6d703/packages/shipit-deploy/src/tasks/deploy/fetch.js#L24
Thanks for investigated it, so it is a bug in v4. Will try to find it.