Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97313

flowtype errors don't update on edit in vscode

$
0
0

Problem

I am having trouble getting the Flow Language Support extension for VSCode to update on edit. I put this in an issue in the repo for the extension, but haven't gotten a response (https://github.com/flowtype/flow-for-vscode/issues/372).

Configuration

Flow Language Support Version: 1.5.0 (2019-09-09)

VSCode About

Version: 1.41.0 (user setup)
Commit: 9579eda04fdb3a9bba2750f15193e5fafe16b959
Date: 2019-12-11T18:37:42.077Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.18362

Example

> mkdir vscode-test
> cd vscode-test
> npm init -y 
> echo ""> .flowconfig
> code .

Disabled the builting plugin TypeScript and JavaScript Language Features

./index.js

// @flow

const n = 5;

const f = (n: string) => n + 1

console.log(f(n));

Testing

I tested the above file by removing an adding the type to the function parameter. When adding the type it, the error would not appear until I saved. When removing it would not remove it until I saved.

I tried this with the bundled flow.

[Error - 11:15:12 AM - vscode-test\.flowconfig] Error loading flow using option 'useNPMPackagedFlow'
Pkg flow-bin not found in c:\Users\rpcan\project\vscode-test
[Error - 11:15:12 AM - vscode-test\.flowconfig] Error loading flow using option 'pathToFlow''flow' not found
[Info  - 11:15:12 AM - vscode-test\.flowconfig] Falling back to bundled flow.
[Info  - 11:15:12 AM - vscode-test\.flowconfig] Using flow 'C:\Users\rpcan\.vscode\extensions\flowtype.flow-for-vscode-1.5.0\node_modules\flow-bin\flow-win64-v0.107.0\flow.exe' (v0.107.0)
Launching Flow server for C:\Users\rpcan\project\vscode-test
Spawned flow server (pid=33612)
Logs will go to C:\Users\rpcan\AppData\Local\Temp\flow\CzCzBUserszBrpcanzBprojectzBvscode-test.log
Monitor logs will go to C:\Users\rpcan\AppData\Local\Temp\flow\CzCzBUserszBrpcanzBprojectzBvscode-test.monitor_log
[Info  - 11:15:13 AM] Starting Flow server

And with flow-bin

> npm install -D flow-bin

and the output

[Info  - 1:18:24 PM - vscode-test\.flowconfig] Found flow using option `useNPMPackagedFlow`
[Info  - 1:18:24 PM - vscode-test\.flowconfig] Using flow 'c:\Users\rpcan\project\vscode-test\node_modules\flow-bin\flow-win64-v0.114.0\flow.exe' (v0.114.0)
Launching Flow server for C:\Users\rpcan\project\vscode-test
Spawned flow server (pid=8332)
Logs will go to C:\Users\rpcan\AppData\Local\Temp\flow\CzCzBUserszBrpcanzBprojectzBvscode-test.log
Monitor logs will go to C:\Users\rpcan\AppData\Local\Temp\flow\CzCzBUserszBrpcanzBprojectzBvscode-test.monitor_log
[Info  - 1:18:26 PM] Starting Flow server

Given the simplicity of this example I feel like there is a strong possibility I must be doing something wrong, but I can't figure out what.

Additional Things I've tested:

  • unchecking useLSP in the extension settings, reloading the client, and checking it again gets it to work briefly but has either stopped working at some point or ends up with the "Server is busy" message eventually.
  • tried removing the extension and restarting and then reinstalling, but didn't have any effect
  • updated flow-bin to 0.115.0 with no effect.

Viewing all articles
Browse latest Browse all 97313

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>