I get this notification in Visual Studio Code, but no further information is provided that would allow me to fix the issue (what server? what version? where is it running? docs?)
I understand that this may be more related to my local configuration, but more information on how to debug/fix this notification would be helpful.
Thanks!
@amypellegrini Flow path which this plugin is using is printed in vscode Output > Flow, You can use that to debug.
What fixed it for me on Windows 10 was to run: npm install --global flow-bin
And update the version at the bottom of the file .flowconfig
What fixed it for me on Windows 10 was to run:
npm install --global flow-bin
And update the version at the bottom of the file.flowconfig
+1 also fixed this way on ubuntu
being forced to use a global version of flow is not a solution
you cannot rely on your every project working with the same version
It's likely that you've not seen the option to use the node_modules version: see flow.useNPMPackagedFlow in the README
Man this is non-trivial to solve. Installed globally and added to .flowconfig and still getting the error. Any way to see the path of the binary it is using?
Changing
"flow.pathToFlow": "${workspaceRoot}/node_modules/.bin/flow"
to
"flow.pathToFlow": "${workspaceFolder}/node_modules/.bin/flow",
fixed it for me 馃
Thanks! The setting flow.useNPMPackagedFlow fixed it for me.
@oshalygin Can you check the console output (the one integrated to VSC)? You should be able to see the path there as per @Mayank1791989 suggestion.
Thanks @amypellegrini !! Interestingly enough everything works well today. I will post back if I see anything but I do have flow.useNPMPackagedFlow set and installed it globally. Today its all roses.
BTW @amypellegrini thanks for all the work on this project/extension. Sometimes report issues the wrong way which can be pretty annoying. I just want to say that we are all here to help the project improve and if I find what the issue is I'd be honored to put together a PR :)
馃殌
@oshalygin @go2rob @amypellegrini @thealjey @alexandereneroth @Gujie-Novade If your project has local flow-bin dependency then there is no need to install flow-bin globally, only set config flow.useNPMPackagedFlow: true that will be enough.
Also you can hover over the flow status bar widget or open flow output panel to find the flow path this plugin is using (Note: you will need plugin version >=1.1.0 for this)
The current flow-bin resolution behaviour
1) useNPMPackagedFlow (default: false): will try to find locally (if failed or value false then will go to next).
2) flow.pathToFlow (default: global flow): Will try this (if failed will go to next).
3) flow bundled with this plugin.
@orta Should we change useNPMPackagedFlow default value to true.
At the bottom of VS Code (in red) will be the Flow version number. Update the package version in package.json to match and then npm / yarn install
Closing as https://github.com/flowtype/flow-for-vscode/issues/317#issuecomment-473504623 answered all the issues. Feel free to reopen issue if you are still facing the issue.
@Mayank1791989 I'm still running into this issue regularly.
in package.json:
"flow-bin": "0.90.0",
[Info - 10:40:01 AM - smb-admin-ui/.flowconfig] Found flow using option `useNPMPackagedFlow`
[Info - 10:40:01 AM - smb-admin-ui/.flowconfig] Using flow '/Users/willis/code/smb-admin-ui/node_modules/flow-bin/flow-osx-v0.90.0/flow' (v0.90.0)
Launching Flow server for /Users/willis/code/smb-admin-ui
Spawned flow server (pid=20225)
Logs will go to /private/tmp/flow/zSUserszSwilliszScodezSsmb-admin-ui.log
Monitor logs will go to /private/tmp/flow/zSUserszSwilliszScodezSsmb-admin-ui.monitor_log
[Info - 10:40:01 AM] Starting Flow server

Most helpful comment
Changing
to
fixed it for me 馃