Coder Social home page Coder Social logo

jsonrpc-ws-proxy about jupyterlab-lsp HOT 7 CLOSED

jupyter-lsp avatar jupyter-lsp commented on May 17, 2024
jsonrpc-ws-proxy

from jupyterlab-lsp.

Comments (7)

bollwyvl avatar bollwyvl commented on May 17, 2024

from jupyterlab-lsp.

SergeyPy avatar SergeyPy commented on May 17, 2024

This is still a work in progress. Where did you get the code, how did you install the code, what os are you on, those kinds of things, would help.

I use Mac OS, I do everything in order as it is written in readme:

install the extension:

jupyter labextension install @krassowski/jupyterlab-lsp

install servers for languages of your choice. Below are examples for Python (with pyls) and R (with languageserver):

pip install python-language-server[all]

next, I go to the folder

/Users/sergejsuhinin/anaconda 3/lib/python 3.7/site-packages/jupyterlab/staging

create servers.yml file:

langservers:
python:
- pyls
R:
- R
- --slave
- -e
- languageserver::run()

and execute the following commands

npm install
npm run build
jupyter labextension link .

this is where the problems arise

node_modules/jsonrpc-ws-proxy/dist/server.js: No such file or directory

from jupyterlab-lsp.

bollwyvl avatar bollwyvl commented on May 17, 2024

from jupyterlab-lsp.

krassowski avatar krassowski commented on May 17, 2024

For normal installation (jupyter labextension install @krassowski/jupyterlab-lsp) you should not execute the following commands:

npm install
npm run build
jupyter labextension link .

These are for development install (please take a careful look at the instructions in the readme).

The readme does not say that you should go to the staging directory, but rather that the node_modules/jsonrpc-ws-proxy/dist/server.js is likely to be located there. The servers.yml should not be created in the staging directory but in your current project directory.

And, finally, as @bollwyvl, mentioned the next version (due to be published next month) will remove the necessity to configure the servers.yml - stay tuned.

from jupyterlab-lsp.

SergeyPy avatar SergeyPy commented on May 17, 2024

For normal installation (jupyter labextension install @krassowski/jupyterlab-lsp) you should not execute the following commands:

npm install
npm run build
jupyter labextension link .

These are for development install (please take a careful look at the instructions in the readme).

The readme does not say that you should go to the staging directory, but rather that the node_modules/jsonrpc-ws-proxy/dist/server.js is likely to be located there. The servers.yml should not be created in the staging directory but in your current project directory.

And, finally, as @bollwyvl, mentioned the next version (due to be published next month) will remove the necessity to configure the servers.yml - stay tuned.

Thanks, figured it out. But now the error crashes

Listening to http and ws requests on 3000
Invalid language server /yaml
internal/validators.js:125
    throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type object
    at validateString (internal/validators.js:125:11)
    at normalizeSpawnArguments (child_process.js:411:3)
    at Object.spawn (child_process.js:545:16)
    at Object.createServerProcess (/Users/sergejsuhinin/anaconda3/share/jupyter/lab/staging/node_modules/@sourcegraph/vscode-ws-jsonrpc/lib/server/launch.js:12:30)
    at WebSocketServer.wss.on (/Users/sergejsuhinin/anaconda3/share/jupyter/lab/staging/node_modules/jsonrpc-ws-proxy/dist/server.js:59:37)
    at WebSocketServer.emit (events.js:198:13)
    at handleUpgrade (/Users/sergejsuhinin/anaconda3/share/jupyter/lab/staging/node_modules/jsonrpc-ws-proxy/node_modules/ws/lib/websocket-server.js:92:18)
    at WebSocketServer.completeUpgrade (/Users/sergejsuhinin/anaconda3/share/jupyter/lab/staging/node_modules/jsonrpc-ws-proxy/node_modules/ws/lib/websocket-server.js:324:5)
    at WebSocketServer.handleUpgrade (/Users/sergejsuhinin/anaconda3/share/jupyter/lab/staging/node_modules/jsonrpc-ws-proxy/node_modules/ws/lib/websocket-server.js:247:10)
    at Server.upgrade (/Users/sergejsuhinin/anaconda3/share/jupyter/lab/staging/node_modules/jsonrpc-ws-proxy/node_modules/ws/lib/websocket-server.js:91:16)

from jupyterlab-lsp.

krassowski avatar krassowski commented on May 17, 2024

Could you please paste the exact command you used and the contents of your servers.yml file - this might help to decipher the error message.

from jupyterlab-lsp.

krassowski avatar krassowski commented on May 17, 2024

Closing, as we no longer use jsonrpc-ws-proxy.

from jupyterlab-lsp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.