Atom Error: Unable to start the Bash language server in Windows
roblogic opened this issue · comments
I get these errors when starting Atom (on Windows 10), or reloading the ide-bash plugin
- "Unable to start the Bash language server, Please make sure you've followed the System Requirements section in the README"
- "BashIDE language server for Shell Script unable to start, Error: spawn bash-language-server ENOENT"
Set up everything correctly AFAICT ,and I have just installed the latest release of Atom (1.27.2 x64)
( this issue is forked from comments in #2 )
( could be mitigated by #1 )
( seems quite similar to bash-lsp/bash-language-server#41 )
I think it's happening here in main.js. Maybe "spawn" isn't smart enough to find the npm package in windows
I found a couple of things to look into
A couple of alternatives to existing Node spawn on windows:
Has anyone tried??
(function() {
var childProcess = require("child_process");
var oldSpawn = childProcess.spawn;
function mySpawn() {
console.log('spawn called');
console.log(arguments);
var result = oldSpawn.apply(this, arguments);
return result;
}
childProcess.spawn = mySpawn;
})();
As recommended in: https://stackoverflow.com/questions/27688804/how-do-i-debug-error-spawn-enoent-on-node-js
If so, what were the results?
Switching to using cross-spawn seems like the best options to me.
I've got the same issue and I found a solution on Windows. In the following directory: C:\Users<user>.atom\packages\ide-bash\src you can find a main.js file. I changed the following line:
const command = 'bash-language-server.cmd'
After this change it works for me.
(Before this I tried papesch suggestions with windows-build-tools and superspawn from this page bash-lsp/bash-language-server#41 )
Same issue here.
I've got the same issue and I found a solution on Windows. In the following directory: C:\Users.atom\packages\ide-bash\src you can find a main.js file. I changed the following line:
const command = 'bash-language-server.cmd'
After this change it works for me.(Before this I tried papesch suggestions with windows-build-tools and superspawn from this page mads-hartmann/bash-language-server#41 )
This should be a PR! I created one: #9