我在端口上运行了python语言服务器,现在需要在我的react应用中打开一个websocket才能与PYLS对话。
我使用的是monaco-languageclient
,此行专门编译失败:
MonacoServices.install(editor); //MonacoServices is from monaco-languageclient
Failed to compile.
./node_modules/vscode-languageclient/lib/client.js
Module not found: Can't resolve 'vscode' in '/node_modules/vscode-languageclient/lib'
不应依赖于vscode,对吧?
此人通过编辑其Webpack设置找到了解决方法,但是要这样做,我必须退出https://stackoverflow.com/a/56644955/3344422
还有其他解决方法吗?
(我正在使用此monaco库,因此不必编辑Webpack配置https://github.com/suren-atoyan/monaco-react#editor-instance)