facebookarchive / flow-language-server

An implementation of the Language Server Protocol for Flow
Other
188 stars 21 forks source link

flow-versions No suitable flow found on disk #79

Open rssfrncs opened 6 years ago

rssfrncs commented 6 years ago

Running Windows 10, flow-for-vscode with flow.useLSP enabled.

Flow output results in "No suitable flow found on disk" and attempts to download from Github, which fails on my system but that is due to our corporate proxy.

The issue is why does it fail to find flow on disk when it is installed both locally and globally via Yarn?

wchargin commented 6 years ago

I was hitting the same error. I solved it by adding --try-flow-bin to the language server invocation, which causes the language server to use the locally installed version of Flow in the project’s node_modules directory.

jbachhardie commented 6 years ago

I've looked into this a little bit and I think it's adm-zip introducing a bug in Windows in a recent version which makes the downloaded flow version fail to extract.

kumarharsh commented 6 years ago

See https://github.com/jbachhardie/vscode-flow-ls/issues/3

ArmorDarks commented 6 years ago

This issue happens because on Windows it tries to write with the wrong path:

C:\Users\serjl\AppData\Roaming\Flow\bin\0.81.0\Users\serjl\AppData\Roaming\Flow\bin\0.81.0

Note the recurring path portion.

Related issue https://github.com/flowtype/flow-for-vscode/issues/273