graphql / vscode-graphql

MIGRATED: VSCode GraphQL extension (autocompletion, go-to definition, syntax highlighting)
https://marketplace.visualstudio.com/items?itemName=Prisma.vscode-graphql
MIT License
555 stars 71 forks source link

How to install Watchman on windows! #62

Closed guledali closed 4 years ago

guledali commented 6 years ago

I have installed the plugin, reload the application and then headed over to my schema.graphql

So this is what thus plugin should do!

  1. syntax highlighting (type, query, mutation, interface, union, enum, scalar, fragments)
  2. autocomplete suggestions
  3. validation against schema
  4. snippets (interface, type, input, enum, union)
  5. hover support
  6. go to definition support (input, enum, type)

It does none of those things for me I'm also getting this error watchman

Question how do I install Watchman on my windows machine, I looked at facebook guide and it's little bit advanced.

vadistic commented 6 years ago

I think you mixed up GraphQL extensions. I think you are trying to use this one. AFAIK vscode-graphql by Prisma does not require watchman 😃

(Btw. To install watchman - just download the zip, extract it somewhere - i.e to C:\Users\USERNAME\AppData\Local\ & add to your PATH)

guledali commented 6 years ago

I don't need the watchman and I don't have that other plugin installed, just prisma one

So when I hover over (title: String!)

screenshot 97

Is this all the package plugin does also go to definition support not working.

I do notice that it highlights the code if I hold CTRL and click on some definition.

guledali commented 6 years ago

@vadistic Installing watchmanC:\Users\USERNAME\AppData\Local\ & add to your PATH)

What do mean add to your PATH? I actually navigated to that PATH put the watchman.exefile their and it still didn't work.

vadistic commented 6 years ago

@guledali I'm really sorry for late reply.

What do mean add to your PATH?

I just meant that you need make sure watchman localisation is on PATH environmental variable for your system/ user

Straight from watchman docs:

Extract the zip file and make sure that watchman.exe is located in a directory that is in your PATH.

Quick instructions for imo the quickest way to do it: 1) So you put watchman directory in C:\Users\USERNAME\AppData\Local\ (so watchman.exe is in C:\Users\USERNAME\AppData\Local\watchman\watchman.exe) 2) Open PowerShell as Administrator 3) Add directory to PATH env variable by using setx path "%path%;C:\Users\USERNAME\AppData\Local\watchman" 4) You can check that it was added: $ENV:PATH 5) And that watchman is found: watchman -v

Voilà!

//EDIT And btw. my first reply was misleading - unfortunately graphql-languege-service is using watchman, and so all the extensions 😢

MIKI0N commented 5 years ago

Quick instructions for imo the quickest way to do it:

1. So you put watchman directory in `C:\Users\USERNAME\AppData\Local\` (so `watchman.exe` is in `C:\Users\USERNAME\AppData\Local\watchman\watchman.exe`)

2. Open PowerShell as Administrator

3. Add directory to PATH env variable by using `setx path "%path%;C:\Users\USERNAME\AppData\Local\watchman"`

4. You can check that it was added: `$ENV:PATH`

5. And that watchman is found: `watchman -v`

Voilà!

@vadistic Your instructions worked, but also replaced all the custom directories that were in the User Path variable with the system Path directories. As a result, I started to have issues while installing or reinstalling node modules with npm (like when installing a module, it would finish successfully, but node couldn't find it later).

I needed to restore my computer to a point before I did everything you said in order to fix the issue.

I'm pretty sure it wasn't your intention, but be more careful with what you suggest to people. There's always going to be people that follow instructions or tutorials without first verifying what it truly does (as me, in this case).

acao commented 4 years ago

watchman is no longer required for the language server, and thus for this extension!

enjoy windows users! if you have any other issues with paths/etc, please open a new ticket!