Skip to content

Server does not work at all #698

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
feelingsonice opened this issue Jan 26, 2023 · 4 comments
Closed

Server does not work at all #698

feelingsonice opened this issue Jan 26, 2023 · 4 comments

Comments

@feelingsonice
Copy link
Contributor

Code editor

Sublime Text 4

Platform

MacOs 13.1

Version

Crashes

What steps will reproduce the bug?

Any command onbash-language-server

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior?

No response

What do you see instead?

I see the following crash error for any commands given to bash-language-server, even the -v flag:

internal/modules/cjs/loader.js:883
  throw err;
  ^

Error: Cannot find module 'node:child_process'
Require stack:
- /usr/local/lib/node_modules/bash-language-server/out/server.js
- /usr/local/lib/node_modules/bash-language-server/out/cli.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/bash-language-server/out/server.js:12:30)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/local/lib/node_modules/bash-language-server/out/server.js',
    '/usr/local/lib/node_modules/bash-language-server/out/cli.js'
  ]
}

Additional information

No response

@skovhus
Copy link
Collaborator

skovhus commented Jan 26, 2023

Which version of node are you using? node —version? Node version 14 is required.

@skovhus skovhus closed this as completed Jan 26, 2023
@feelingsonice
Copy link
Contributor Author

Which version of node are you using? node —version? Node version 14 is required.

I'm using node v14.16.0

@skovhus
Copy link
Collaborator

skovhus commented Jan 26, 2023

So it seems the node import protocol was introduced with node v14.18.0. https://nodejs.org/api/esm.html#node-imports

But note that node 14 is end of life 30 April 2023.

We should change the required engine to be >=14.18 instead of >14. Then installing the server should have failed — although I’m unsure how the sublime client actually installs the server.

@feelingsonice
Copy link
Contributor Author

#699

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants