facebookarchive/ide-flowtype

No Outline Available for flow enabled javascript files

sguergachi opened this issue · 8 comments

Installed the atom-ide packages as well as this package on Atom for Windows, and added // @flow to the top of a .js file, and the outline still says "No Outline Available, This is likely an error with the language package"

I tried re-installing both packages, and the issue remains.

I opened the dev screen and saw this error if that helps:
Failed to load resource: net::ERR_FILE_NOT_FOUND nuclicons.ttf

@sguergachi I believe the key to getting flow going is adding a .flowconfig file to the root of your project. An empty file should suffice for starters: https://flow.org/en/docs/config/

That is in addition to adding the // @flow annotation you already did.

So....

I reinstalled the plugin
image

I created the .flowconfig file
b8bdeda831cefa278b3703db06c25565 _image 25202018-01-18 2520at 25201 33 47 2520pm 1

and I added // @flow annotation
image

And I still get no outline and no auto complete feature of any kind.
7a9d77a98f9b392bcd39a6e2ff5d3183 _image 2018-01-18 at 1 37 17 pm 1

@sguergachi I had the same issue. Apparently when they say the .flowconfig must be at the root of the project it doesn't mean "we'll figure out where the root of your "flow" project is based on where you put your .flowconfig file", but literally "this won't work at all unless there is a .flowconfig file in the root folder you currently have open as the main atom project"

This means it won't work if you have a monorepo setup with "server" / "client" / "etc..." folders, like you have in your project.

I'm working around this by cding into my client folder on the command line and opening it up as a top-level atom project via atom ./. It's inconvenient because I'd like to be able have the entire monorepo opened in atom for quicker context switching, but /shrug-emoji

Wow that worked, I just reopened the subfolder that contained the .flowconfig file in a new window and that fixed it!

This must be a Windows only issue, because the Readme has a gif showing subfolder projects withing a github project like me, working just fine, in what I assume is macOS:
image

At least until this is fixed, the Readme should be updated to specify this requirement for Windows users, so they don't waste time like I did on such a trivial issue.

It's not a Windows issue as I am on a Mac

Strange, I guess the issue must have been introduced recently if the gif on the Readme is to be believed.