Skip to content

[WIP] Include server in VSCode client #72

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
wants to merge 3 commits into from

Conversation

skovhus
Copy link
Collaborator

@skovhus skovhus commented Aug 2, 2018

This is a work in progress PR trying to remove the manual step of installing the server.

It currently fails when running locally (Launch Client) with:

Error: The module '/Users/kenneth/git/bash-language-server/vscode-client/node_modules/tree-sitter/build/Release/tree_sitter_runtime_binding.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 48. This version of Node.js requires
NODE_MODULE_VERSION 54. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or`npm install`).
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
    at Object.Module._extensions..node (module.js:598:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/kenneth/git/bash-language-server/vscode-client/node_modules/tree-sitter/index.js:3:13)
    at Object.<anonymous> 

The reason seems to be that the dependencies are installed locally with yarn/npm for my machine/node version, but once I start the client with Launch Client it runs inside Electron.

Things to investigate: https://electronjs.org/docs/tutorial/using-native-node-modules

It might be that this works when installing the extension through VSCode.

@skovhus skovhus force-pushed the include-server-in-client branch from 2a17176 to a9fdd96 Compare August 2, 2018 20:33
@mads-hartmann
Copy link
Collaborator

@skovhus It might be interesting to try to package and install it manually without publishing it to the store :)

cd vscode-client && vsce package
code --install-extension <path to package.vix>

@mads-hartmann
Copy link
Collaborator

(by the way if that's a useful way to debug something it might be nice to add it to the docs somewhere 😉)

@skovhus skovhus force-pushed the include-server-in-client branch from a9fdd96 to 175f5e5 Compare November 20, 2018 16:52
@skovhus skovhus force-pushed the include-server-in-client branch from 175f5e5 to 756cef0 Compare November 20, 2018 17:21
@skovhus
Copy link
Collaborator Author

skovhus commented Jun 1, 2019

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

Successfully merging this pull request may close these issues.

2 participants