Comments (7)
I'll move this to LSP repo to handle this case better. It happened with eslint and other servers before.
from lsp.
We should handle that better on the LSP side by not just silently closing the server but this happens because we've received an unexpected payload from Volar's stdout
. In this case it's
"Error: Cannot find module '@volar-plugins/prettyhtml'
Require stack:
- /Users/rafal/Downloads/volar-starter-with-nodemodules/volar.config.js
- /usr/local/workspace/github/volarjs/vue/node_modules/.pnpm/@[email protected]/node_modules/@volar/language-server/out/common/utils/serverConfig.js
- /usr/local/workspace/github/volarjs/vue/node_modules/.pnpm/@[email protected]/node_modules/@volar/language-server/out/common/server.js
- /usr/local/workspace/github/volarjs/vue/node_modules/.pnpm/@[email protected]/node_modules/@volar/language-server/out/node/index.js
- /usr/local/workspace/github/volarjs/vue/node_modules/.pnpm/@[email protected]/node_modules/@volar/language-server/node.js
- /usr/local/workspace/github/volarjs/vue/packages/vue-language-server/out/nodeServer.js
at Module._resolveFilename (node:internal/modules/cjs/loader:963:15)
at Module._load (node:internal/modules/cjs/loader:811:27)
at f._load (node:electron/js2c/asar_bundle:2:13330)
at Module.require (node:internal/modules/cjs/loader:1035:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/rafal/Downloads/volar-starter-with-nodemodules/volar.config.js:3:9)
at Module._compile (node:internal/modules/cjs/loader:1141:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1196:10)
at Module.load (node:internal/modules/cjs/loader:1011:32)
at Module._load (node:internal/modules/cjs/loader:846:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/rafal/Downloads/volar-starter-with-nodemodules/volar.config.js',
'/usr/local/workspace/github/volarjs/vue/node_modules/.pnpm/@[email protected]/node_modules/@volar/language-server/out/common/utils/serverConfig.js',
'/usr/local/workspace/github/volarjs/vue/node_modules/.pnpm/@[email protected]/node_modules/@volar/language-server/out/common/server.js',
'/usr/local/workspace/github/volarjs/vue/node_modules/.pnpm/@[email protected]/node_modules/@volar/language-server/out/node/index.js',
'/usr/local/workspace/github/volarjs/vue/node_modules/.pnpm/@[email protected]/node_modules/@volar/language-server/node.js',
'/usr/local/workspace/github/volarjs/vue/packages/vue-language-server/out/nodeServer.js'
]
}
Content-Length: 1906
"
I suppose that VSCode is either more permissive in handling stdio
or it uses nodeipc instead (we can't switch to it yet due to reliance on Python 3.3).
I will still try to make some fix in LSP to surface those issues to the user.
from lsp.
And of course Volar should also post such errors to stderr
and not stdout
and either close itself or respond with error to initialize
.
from lsp.
I see that you are actually using Node IPC for communicating with Volar in VSCode. Such issues don't affect IPC communication.
from lsp.
This is the problem line: https://github.com/volarjs/volar.js/blob/master/packages/language-server/src/common/utils/serverConfig.ts#L17
I guess I should try to use connection.logger
instead of console
?
from lsp.
Yes. Or console.error
but I suppose console.error
would not be surfaced anywhere when using IPC so connection.logger
seems more appropriate.
from lsp.
Thanks for confirming, I'll track it upstream.
from lsp.
Related Issues (20)
- Capabilites with selector fails to register
- ModuleNotFoundError: No module named 'wcmatch.glob' HOT 13
- Prepare for upgrade of bracex and wcmatch libraries HOT 6
- [Runtime Error] ModuleNotFoundError: No module named 'wcmatch' HOT 1
- Investigate why didSave notification is not sent if view closed immediately after saving
- Two alternative hover definitions provided: one on mouseover, the other upon keyboard shortcut HOT 6
- Not Working After 3.8 Upgrade HOT 3
- Discuss removal of some APIs HOT 3
- Allow LSP packages to customize format_completion HOT 1
- Support list of commands, provided by language servers HOT 5
- Syntax highlighting in popups, returned by 3rd party language server, not work HOT 10
- Package is not installable HOT 5
- MissingUriError: View has no URI HOT 1
- `websocket_server` installs a root logger
- Cannot install LSP on clean installation HOT 15
- Updated to LSP 2.1.0 leads to FileNotFoundError and no LSP HOT 6
- `lsp_code_actions_on_save` do not work intermittently HOT 8
- KeyError on file-watcher HOT 2
- Replace `Enum` object with it's scalar value in the LSP log panel? HOT 1
- Text selection in popups HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsp.