Supergraph schema compiling failure in windows

Hi everybody

i can not compile the supergraph schema using rover cli

i get this error
Could not read “../weather-schema.graphql”: stream did not contain valid UTF-8
Make sure supergraph compose config YAML points to a valid schema file.

although the path is correct

does rover cli work on windows ?

I imagine quite a bit of users use Mac or Linux over Windows, but the first thing that I would check is your encoding.

In the bottom of VS Code you can see the encoding and carriage return style. On Mac, the default is UTF-8 and LF as far as I’m aware.

If that’s not on something other than UTF-8, then the problem is presumably in your schema, and I would check that.

If you’re having trouble on Windows, you can always use the Windows Subsystem for Linux 2, which is my preferred method when working on Windows.

Hi Kevin-lindsay-1 ,

Its not working even if i change the encoding way correctly

Has any alternative to this problem been found?
Because even I am getting this error:-
ERROR Failed to read schema: stream did not contain valid UTF-8
ERROR no valid schema was supplied
no valid schema was supplied

If you’re using rover on windows to compile a supergraph and you’re following the instructions to use a shell redirect (something like rover supergraph compose > supergraph.graphql), such as from [1], that will generate files with the encoding UTF16 LE. Instead, you need to use the --output supergraph.graphql parameter. That will save UTF-8 files.

[1] Federation quickstart - Apollo GraphQL Docs as of 2024-01-22 says

rover supergraph compose --config ./supergraph-config.yaml > supergraph.graphql