Looking at the example here: https://github.com/TypeFox/monaco-languageclient/blob/master/example/src/client.ts I got the impression that this package is meant to be consumed in the browser. However when I try the above sample (instead of typescript I'm just using js), there is an error because vscode-jsonrpc (used by this module) seems to require the net module which is obviously not available for browsers.
Is this expected? Should I just polyfill the net module?
ERROR in ./node_modules/vscode-jsonrpc/lib/pipeSupport.js
Module not found: Error: Can't resolve 'net' in '/Users/balazs.edes/code/studio-prototype-bitbucket/node_modules/vscode-jsonrpc/lib'
@ ./node_modules/vscode-jsonrpc/lib/pipeSupport.js 10:12-26
@ ./node_modules/vscode-jsonrpc/lib/main.js
@ ./node_modules/vscode-ws-jsonrpc/lib/index.js
@ ./src/components/TempEditorScreen/connectWithLanguageServer.js
@ ./src/components/TempEditorScreen/index.js
@ ./src/components/App/index.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:3000 ./src/index.js
ERROR in ./node_modules/vscode-jsonrpc/lib/socketSupport.js
Module not found: Error: Can't resolve 'net' in '/Users/balazs.edes/code/studio-prototype-bitbucket/node_modules/vscode-jsonrpc/lib'
@ ./node_modules/vscode-jsonrpc/lib/socketSupport.js 7:12-26
@ ./node_modules/vscode-jsonrpc/lib/main.js
@ ./node_modules/vscode-ws-jsonrpc/lib/index.js
@ ./src/components/TempEditorScreen/connectWithLanguageServer.js
@ ./src/components/TempEditorScreen/index.js
@ ./src/components/App/index.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:3000 ./src/index.js
Looking at the example here: https://github.com/TypeFox/monaco-languageclient/blob/master/example/src/client.ts I got the impression that this package is meant to be consumed in the browser. However when I try the above sample (instead of typescript I'm just using js), there is an error because
vscode-jsonrpc
(used by this module) seems to require thenet
module which is obviously not available for browsers.Is this expected? Should I just polyfill the
net
module?The error happens just after I require
listen
:import { listen } from 'vscode-ws-jsonrpc'