LSP-pyright icon indicating copy to clipboard operation
LSP-pyright copied to clipboard

Exception when "installing file system watcher"

Open rwols opened this issue 3 years ago • 4 comments

In the server log panel I see this message:

LSP-pyright: Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js

OS is Ubuntu 20.4. System node is v12. I have a Node v14 installed in $cache/Package Storage/lsp_utils/

rwols avatar Oct 02 '21 12:10 rwols

https://github.com/paulmillr/chokidar says that on Linux fs.watch API is used and that does not provide recursive watching...

Kinda surprising since this library is used "everywhere" so I don't get how it could not support such basic need...

rchl avatar Oct 02 '21 20:10 rchl

Oh, somehow I've assumed that this is related to my https://github.com/sublimelsp/LSP-file-watcher-chokidar but I guess this is internal error from Pyright instead. In that case an issue in the Pyright repo would likely receive a quick response.

rchl avatar Oct 02 '21 20:10 rchl

https://stackoverflow.com/questions/61806341/how-to-fix-the-feature-watch-recursively-is-unavailable-on-the-current-platform has relevant answer

rchl avatar Oct 02 '21 20:10 rchl

Pyright could fix it so that it wouldn't pass recursive: true on linux. Maybe not a great idea in case support is added in the future but can always be refined later.

rchl avatar Oct 02 '21 20:10 rchl