Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while running external preprocessor #259

Closed
SamWoolerton opened this issue Jun 23, 2021 · 1 comment
Closed

Error while running external preprocessor #259

SamWoolerton opened this issue Jun 23, 2021 · 1 comment

Comments

@SamWoolerton
Copy link

I'm getting a compilation error to do with the PPX when I try follow the getting started guide for rescript-urql. The query looks fine to me (copy-pasted the whole example module) so not sure why it won't compile. I first raised this issue in that repo but was directed here instead.

Can confirm that my graphql_schema.json and bsconfig.json files are valid JSON.

Here's the command line output (on Windows; same thing happens on WSL):

>>>> Start compiling 
rescript: [1/3] src/utility/GraphQL.ast
FAILED: src/utility/GraphQL.ast
Fatal error: exception Yojson.Json_error("Line 1, bytes 0-33:\nInvalid token '\255\254{\000\r\000\n\000 \000 \000\"\000_\000_\000s\000c\000h\000e\000m\000a\000\"\000:'")

  We've found a bug for you!
  C:\programming\mem\src\utility\GraphQL.res

  Error while running external preprocessor
Command line: C:\programming\mem\node_modules\@reasonml-community\graphql-ppx\ppx "C:\Users\samw\AppData\Local\Temp\ppxd9e1a1GraphQL.res" "C:\Users\samw\AppData\Local\Temp\ppxe67fe2GraphQL.res"


FAILED: cannot make progress due to previous errors.
>>>> Finish compiling(exit: 1)
@SamWoolerton
Copy link
Author

Update: turns out get-graphql-schema generated the file as UTF-16, which looked fine in VS Code but was the source of the issues (see this issue). Not sure if UTF-16 is something you want to support, so I'll leave this issue open for now but happy to close it as I'm up and running again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants