You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uncaught Exception: TypeError: connection.onDidOpenTextDocument is not a function
TypeError: connection.onDidOpenTextDocument is not a function
at TextDocuments.listen (/Users/rick.zhou/Desktop/monaco-lsp-demo/sql-language-server/node_modules/sql-language-server/node_modules/vscode-languageserver/lib/common/textDocuments.js:115:20)
at createServerWithConnection (/Users/rick.zhou/Desktop/monaco-lsp-demo/sql-language-server/node_modules/sql-language-server/src/createServer.ts:44:13)
at launch (file:///Users/rick.zhou/Desktop/monaco-lsp-demo/sql-language-server/launcher.ts:14:28)
at file:///Users/rick.zhou/Desktop/monaco-lsp-demo/sql-language-server/main.ts:58:9
at WebSocketServer.completeUpgrade (/Users/rick.zhou/Desktop/monaco-lsp-demo/sql-language-server/node_modules/ws/lib/websocket-server.js:431:5)
at WebSocketServer.handleUpgrade (/Users/rick.zhou/Desktop/monaco-lsp-demo/sql-language-server/node_modules/ws/lib/websocket-server.js:339:10)
at Server.<anonymous> (file:///Users/rick.zhou/Desktop/monaco-lsp-demo/sql-language-server/main.ts:39:9)
at Server.emit (node:events:527:28)
at Server.emit (node:domain:475:12)
at onParserExecuteCommon (node:_http_server:732:14)
importexpressfrom'express';import{IncomingMessage}from'http';import{Socket}from'net';import{URL}from'url';import{IWebSocket}from'vscode-ws-jsonrpc';import{WebSocketServer}from'ws';import{getLocalDirectory}from'./fs-utils.js';import{launch}from'./launcher.js';process.on('uncaughtException',function(err: any){console.error('Uncaught Exception: ',err.toString());if(err.stack){console.error(err.stack);}});// create the express applicationconstapp=express();// server the static content, i.e. index.htmlapp.use(express.static(getLocalDirectory()));// start the serverconstserver=app.listen(3000);// create the web socketconstwss=newWebSocketServer({noServer: true,perMessageDeflate: false});server.on('upgrade',(request: IncomingMessage,socket: Socket,head: Buffer)=>{constbaseURL=`http://${request.headers.host}/`;constpathname=request.url ? newURL(request.url,baseURL).pathname : undefined;if(pathname==='/sqlls'){wss.handleUpgrade(request,socket,head,webSocket=>{constsocket: IWebSocket={send: content=>webSocket.send(content,error=>{if(error){throwerror;}}),onMessage: cb=>webSocket.on('message',data=>{console.log(data.toString());cb(data);}),onError: cb=>webSocket.on('error',cb),onClose: cb=>webSocket.on('close',cb),dispose: ()=>webSocket.close()};// launch the server when the web socket is openedif(webSocket.readyState===webSocket.OPEN){launch(socket);}else{webSocket.on('open',()=>launch(socket));}});}});
The text was updated successfully, but these errors were encountered:
When I start the project, I get this error
env
The text was updated successfully, but these errors were encountered: