Since upgrading this extension today it is not working anymore. This is the case for both me and my colleague.
What is still working
[2017-05-26T15:06:27.986Z] [INFO] flow - Path to Flow: /myproject/node_modules/.bin/flow
[2017-05-26T15:06:37.254Z] [INFO] flow - [unknown]: Flow server in /myproject
[2017-05-26T15:06:37.433Z] [INFO] flow - [ready]: Flow server in /myproject
What is not working:
I have switched to atom with nuclide as a workaround.
Some kind of missing module?
@0xR I tried to as well, but Nuclide was so painfully slow and laggy :(
Anyone know if there's a way to downgrade a plugin in VS code?
Not sure if my issue is the same or not (I only just installed vscode & this plugin recently, and never used a previous version).
In my case, the flow server runs fine, but it won't refresh the errors in the editor or problems panes unless I select a different file and then go back.
My colleagues and I have experienced the same issue that @spudly had since we updated to 0.7.0.
same for me and my colleagues, flow server does run, but we got this error in the flow output
flow - Invalid JSON result from flow status --json
try putting javascript.validate.enable to true in your settings.
Flow error are showing again (together with js ones :/)
I uninstalled it and re-installed and seems to be working better now.
馃帀 I got it working again by updating my global flow-bin to 0.47.0 using the vscode plugin @ 0.7.0
Switching to flow 0.47.0 did not help in my case. It still doesn't update unless I switch files and switch back.
@spudly somehow that's what's happening to me now. I admit that I'm perplexed by this.
Although I just tried using the "Javascript React" syntax language instead of straight Javascript and now my Flow errors are going away without switching files.
It's broken for me as well. flow-bin 0.48.0
+1 broken for me. flow-bin 0.48.0 extension 0.7.0
Could some of the contributors of 0.7 investigate or at least comment? @orta @thymikee @gabelevi
By default pathToFlow is set to flow, which takes Flow from global (or bundled with extension, not sure as I didn't checked that lately) installation.
This creates whole lot of troubles, when global version differs from the one declared in .flowconfig.
I like to set "pathToFlow": "node_modules/.bin/flow" globally and the whole thing works nicely for different versions of Flow in couple of different projects. It's worth to mention however that when I changed that setting I had to restart VSCode entirely (not only window).
@0xR I'm afraid that /myproject/node_modules/.bin/flow may not be a valid path, unless you put your projects in system root. It's safer to use relative paths.
Seems like something that could be done better anyway.
@thymikee Even with the setting "pathToFlow": "node_modules/.bin/flow" and a full restart, vscode is still unable to find the flow executable.
Additionally, useNPMPackagedFlow does not seem to work
do you have flow-bin in your package.json and it's installed?
@thymikee Yes. Also note I am using yarn for the installation - but that should not make a difference. Both node_modules/flow-bin and node_modules/.bin/flow exist.
So maybe it's about Node version? Also which OS do you run? Maybe we hit a Node-/OS-specific vscode bug, I don't have other ideas now.
I'm running node v6.9.3 and OSX Sierra - both should be stable versions
Just tried on similar setup (macOS, node 6.11) and it works. Meh
Sigh :/ can you delete your globally installed flow-bin (if any) and confirm its still working?
Works without global binary too
Do you have any idea what I can try to get this working? Aside from re-installing vscode
Maybe reinstalling the extension, but you probably already tried that.
I have already tried :)
fwiw, I'm new to flow and visual studio code, and have run into an issue which seems similar. Some things I note:
.flowconfig I get error reporting in VS Code (put another way, the extension doesn't seem to notice // @flow automatically).flowconfig, but I make an irrelevant change to my VS Code settings (e.g. reversing the order of "javascript.validate.enable": false, and "flow.useNPMPackagedFlow": true ) then I'll suddenly get checking on files with just // @flowThat is, my individual experience suggests that the extension has the capability of working, but presumably has stopped noticing // @flow annotations when a file is opened.
fwiw, I have a teeny-weeny repo where you can experience all this for yourself: https://github.com/bodawei/catalog-of-configurations/tree/master/visualstudiocode-flow0.49
Anyway. that's my 2垄.
Hello, using v.0.7.1 and local flow-bin v.0.49.1,
here's my relevant settings.json:
"flow.enabled": true,
"flow.runOnEdit": true,
"flow.showStatus": true,
"flow.runOnAllFiles": true,
"flow.stopFlowOnExit": true,
"flow.useNPMPackagedFlow": true,
And this is the code I'm using:
function yep(message: string) {
console.log(message);
}
yep({ no: false });
// @flow I get error while typing but it disappers on save. 馃槷 // @flow I get error while typing and after save.This is also happening for me, but it only seems to be a problem when the extension of the file is *.flow - if it is .js then the errors appears as expected. I've tried updating files.associations to map *.flow to js, but this doesn't seem to make a difference.
Type hints when mousing over appears regardless.
_Edit_: In fact, just having a .flow anywhere in the directory structure causes strange behaviour with the errors.
I've just updated to 0.7.1, and adding the new option flow.runOnAllFiles: true to settings _makes flow great again_.
I'm using 0.7.1 and half the time on save, the errors appear, the other half of the time the errors flash quickly then disappear.
flow.runOnAllFiles: true, currently not working at all. #152
I have just done a full system format with a fresh install and I am still experiencing this issue. My vscode flow output looks as follows:
[2018-01-07T22:02:51.043Z] [INFO] flow - Path to Flow: /Users/julienvincent/code/bluedot/tcp/node_modules/.bin/flow
[2018-01-07T22:02:51.514Z] [INFO] flow - [unknown]: Flow server in /Users/julienvincent/code/bluedot/tcp
[2018-01-07T22:02:51.528Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:02:51.534Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:02:51.535Z] [ERROR] flow - Flow failed: /Users/julienvincent/code/bluedot/tcp/node_modules/.bin/flow status --json /Users/julienvincent/code/bluedot/tcp/src/index.js. Error: {"exitCode":127,"stderr":"env: node: No such file or directory\n","stdout":""}
[2018-01-07T22:02:51.535Z] [ERROR] flow - Invalid JSON result from flow status --json /Users/julienvincent/code/bluedot/tcp/src/index.js. JSON:
''.
[2018-01-07T22:02:51.542Z] [WARN] flow -
[2018-01-07T22:02:51.549Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:02:51.549Z] [ERROR] flow - Flow failed: /Users/julienvincent/code/bluedot/tcp/node_modules/.bin/flow dump-types --json /Users/julienvincent/code/bluedot/tcp/src/index.js. Error: {"exitCode":127,"stderr":"env: node: No such file or directory\n","stdout":""}
[2018-01-07T22:02:55.218Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:02:55.218Z] [ERROR] flow - Flow failed: /Users/julienvincent/code/bluedot/tcp/node_modules/.bin/flow autocomplete --json /Users/julienvincent/code/bluedot/tcp/src/index.js. Error: {"exitCode":127,"stderr":"env: node: No such file or directory\n","stdout":""}
[2018-01-07T22:02:56.420Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:02:56.426Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:02:56.426Z] [ERROR] flow - Flow failed: /Users/julienvincent/code/bluedot/tcp/node_modules/.bin/flow check-contents --json /Users/julienvincent/code/bluedot/tcp/src/index.js. Error: {"exitCode":127,"stderr":"env: node: No such file or directory\n","stdout":""}
[2018-01-07T22:02:56.427Z] [ERROR] flow - Invalid JSON result from flow check-contents --json /Users/julienvincent/code/bluedot/tcp/src/index.js. JSON:
''.
[2018-01-07T22:02:56.433Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:02:56.434Z] [ERROR] flow - Flow failed: /Users/julienvincent/code/bluedot/tcp/node_modules/.bin/flow dump-types --json /Users/julienvincent/code/bluedot/tcp/src/index.js. Error: {"exitCode":127,"stderr":"env: node: No such file or directory\n","stdout":""}
[2018-01-07T22:03:10.927Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:03:10.933Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:03:10.933Z] [ERROR] flow - Flow failed: /Users/julienvincent/code/bluedot/tcp/node_modules/.bin/flow check-contents --json /Users/julienvincent/code/bluedot/tcp/src/index.js. Error: {"exitCode":127,"stderr":"env: node: No such file or directory\n","stdout":""}
[2018-01-07T22:03:10.934Z] [ERROR] flow - Invalid JSON result from flow check-contents --json /Users/julienvincent/code/bluedot/tcp/src/index.js. JSON:
''.
[2018-01-07T22:03:10.941Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:03:10.941Z] [ERROR] flow - Flow failed: /Users/julienvincent/code/bluedot/tcp/node_modules/.bin/flow dump-types --json /Users/julienvincent/code/bluedot/tcp/src/index.js. Error: {"exitCode":127,"stderr":"env: node: No such file or directory\n","stdout":""}
[2018-01-07T22:03:11.488Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:03:11.496Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:03:11.496Z] [ERROR] flow - Flow failed: /Users/julienvincent/code/bluedot/tcp/node_modules/.bin/flow status --json /Users/julienvincent/code/bluedot/tcp/src/index.js. Error: {"exitCode":127,"stderr":"env: node: No such file or directory\n","stdout":""}
[2018-01-07T22:03:11.496Z] [ERROR] flow - Invalid JSON result from flow status --json /Users/julienvincent/code/bluedot/tcp/src/index.js. JSON:
''.
[2018-01-07T22:03:11.503Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:03:11.504Z] [ERROR] flow - Flow failed: /Users/julienvincent/code/bluedot/tcp/node_modules/.bin/flow dump-types --json /Users/julienvincent/code/bluedot/tcp/src/index.js. Error: {"exitCode":127,"stderr":"env: node: No such file or directory\n","stdout":""}
[2018-01-07T22:03:24.522Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:03:24.522Z] [ERROR] flow - Flow failed: /Users/julienvincent/code/bluedot/tcp/node_modules/.bin/flow type-at-pos --json --path /Users/julienvincent/code/bluedot/tcp/src/index.js 23 25. Error: {"exitCode":127,"stderr":"env: node: No such file or directory\n","stdout":""}
[2018-01-07T22:03:25.980Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:03:25.981Z] [ERROR] flow - Flow failed: /Users/julienvincent/code/bluedot/tcp/node_modules/.bin/flow type-at-pos --json --path /Users/julienvincent/code/bluedot/tcp/src/index.js 2 21. Error: {"exitCode":127,"stderr":"env: node: No such file or directory\n","stdout":""}
[2018-01-07T22:03:37.261Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:03:37.268Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:03:37.268Z] [ERROR] flow - Flow failed: /Users/julienvincent/code/bluedot/tcp/node_modules/.bin/flow status --json /Users/julienvincent/code/bluedot/tcp/src/index.js. Error: {"exitCode":127,"stderr":"env: node: No such file or directory\n","stdout":""}
[2018-01-07T22:03:37.268Z] [ERROR] flow - Invalid JSON result from flow status --json /Users/julienvincent/code/bluedot/tcp/src/index.js. JSON:
''.
[2018-01-07T22:03:37.274Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:03:37.275Z] [ERROR] flow - Flow failed: /Users/julienvincent/code/bluedot/tcp/node_modules/.bin/flow dump-types --json /Users/julienvincent/code/bluedot/tcp/src/index.js. Error: {"exitCode":127,"stderr":"env: node: No such file or directory\n","stdout":""}
[2018-01-07T22:03:38.779Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:03:38.786Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:03:38.786Z] [ERROR] flow - Flow failed: /Users/julienvincent/code/bluedot/tcp/node_modules/.bin/flow status --json /Users/julienvincent/code/bluedot/tcp/src/index.js. Error: {"exitCode":127,"stderr":"env: node: No such file or directory\n","stdout":""}
[2018-01-07T22:03:38.786Z] [ERROR] flow - Invalid JSON result from flow status --json /Users/julienvincent/code/bluedot/tcp/src/index.js. JSON:
''.
[2018-01-07T22:03:38.795Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:03:38.796Z] [ERROR] flow - Flow failed: /Users/julienvincent/code/bluedot/tcp/node_modules/.bin/flow dump-types --json /Users/julienvincent/code/bluedot/tcp/src/index.js. Error: {"exitCode":127,"stderr":"env: node: No such file or directory\n","stdout":""}
[2018-01-07T22:03:42.756Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:03:42.763Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:03:42.763Z] [ERROR] flow - Flow failed: /Users/julienvincent/code/bluedot/tcp/node_modules/.bin/flow status --json /Users/julienvincent/code/bluedot/tcp/src/index.js. Error: {"exitCode":127,"stderr":"env: node: No such file or directory\n","stdout":""}
[2018-01-07T22:03:42.763Z] [ERROR] flow - Invalid JSON result from flow status --json /Users/julienvincent/code/bluedot/tcp/src/index.js. JSON:
''.
[2018-01-07T22:03:42.771Z] [ERROR] flow - Unknown return code from Flow: 127
[2018-01-07T22:03:42.772Z] [ERROR] flow - Flow failed: /Users/julienvincent/code/bluedot/tcp/node_modules/.bin/flow dump-types --json /Users/julienvincent/code/bluedot/tcp/src/index.js. Error: {"exitCode":127,"stderr":"env: node: No such file or directory\n","stdout":""}
As I can now only make use of a globally installed flow, this becomes quite disruptive. The result is that I have to maintain all my flow-based projects at the same flow version.
In other words, if I want to update the version of flow for one of my projects, I either have to update it for all my other projects or alter the version of my globally installed flow when I switch to working on different projects.
Is there anything I can perhaps provide to help close this issue?
Use flow and plugin latest version it should work.
Most helpful comment
Switching to flow 0.47.0 did not help in my case. It still doesn't update unless I switch files and switch back.