coc-flow
coc-flow copied to clipboard
coc-flow in vim
[coc.nvim]Server languageserver.flow failed to start: Command "flow" of language server.flow is not executable: Error: not found: flow
Do you have flow-bin
installed locally on your projecy as development dependency?
i have the same issue. Maybe it's related to flow being installed in the project's client
subfolder. Is it?
How should i fix it if so? Here is my local coc config:
{
"tsserver.enableJavascript": false,
"languageserver": {
"flow": {
"command": "flow",
"args": ["lsp"],
"filetypes": ["javascript", "javascriptreact"],
"initializationOptions": {},
"requireRootPattern": true,
"settings": {},
"rootPatterns": [".flowconfig"]
}
}
}
i also tried to use these config params (that's where my flow binary is located)
"flow.useNPMPackagedFlow": true,
"flow.pathToFlow": "$workspaceFolder/client/node_modules/flow-bin/flow-linux64-v0.78.0/",
but fruitless, same error:
[coc.nvim] Server flow failed to start: Launching server "flow" using command $workspaceFolder/client/node_modules/flow-bin/flow-linux64-v0.78.0/ failed.
@Seybo we seem to have similar issues. I was getting the "failed to start flow" errors.
I uninstalled coc-flow
extension to instead just add the service using language-server. This is a simple matter of adding the "flow" entry in my "languageserver" prop entry (the language server comes "for-free" when you install coc.nvim
).
I now have flow linting up and running while also using tsserver:
"javascript.validate.enable": false, // use tsserver, but not for validation
"flow.enable": true, // DELETE
"flow.pathToFlow": "/Volumes/.../<project_root>/node_modules/.bin/flow", // DELETE
// in my language-server prop include the following entry:
"flow": {
"command": "/Volumes/.../<project_root>/node_modules/.bin/flow", // KEY
"args": ["lsp"],
"filetypes": ["javascript", "javascriptreact", "javascript.jsx"],
"initializationOptions": {},
"requireRootPattern": true,
"rootPatterns": [".flowconfig"],
"settings": {}
},
This is a hack for sure, but as a temp fix it worked for me.
Confirmation of the operating service:
The CocInfo
does not report a "flow" channel despite my seeing the [Flow ..]
linting messages AND seeing languageserver.flow [running]
in the CocList services
report.
... what would make it less of a hack, is to know how to include a ref to my project folder.
I hope this helps.
- E