-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: Invalid AST Node when following Step-by-step Guide #3622
Comments
Ok, I finally found the error: The step-by-step guide should be updated to include:
|
Couldn't we just upgrade the peer dependency of |
As the error only occurs with |
We're currently in the process of deprecating current JS compiler: #3180. The new version won't have a dependency on the |
Just be aware that the current instructions in the docs are not working, which can be quite frustrating and time-consuming for relay newbies like me, especially as the resulting error message is not very helpful. A peer-dependency-not-met-warning is easily overlooked / not given attention to when following instructions from the docs. Although graphql v16 was released only a few days ago, I'm not the only one who stumbled upon this. |
@alunyov I'm a little confused as to the action here. The doc fixes are being closed without merging because the conclusion is to fix the root cause rather than the docs; but the resolution in this ticket is that it's essentially a "wontfix" because the JS compiler is deprecated -- even though its replacement isn't ready yet. This feels like a misstep, this issue has come up multiple times in multiple places in the few days since GraphQL 16 has been released -- everyone following the Relay docs today will face this problem. This doesn't leave the open source users of Relay in a good place. |
@skleeschulte @AndrewIngram thank you for your feedback! As far as I understand, today, if you run:
The output will be something like this:
So, the We'll need to investigate what changes we need to make to the current JS compiler to support the new GraphQL-js version. |
But it still warns you, right? I don't think documentation is the place where we should define/fix version of dependencies. |
My understanding is, that the documentation and the requirements defined in package.json for a specific version of a package should match. So adding the graphql version as it is defined as peer dependency in package.json to the commands in the documentation just fixes a shortcoming of the documentation. Currently, while package.json documents the requirement for graphql@^15.0.0, the documentation instructs to install the latest version. |
Thank you @skleeschulte and @AndrewIngram! Sorry, for this back-and-forth. Again, I think the correct fix should be in the compiler, not in the docs. But it looks like the correct way may take longer. We will update the docs, for now, it makes sense, thank you for PRs! |
Summary: Fix #3622 Pull Request resolved: #3623 Test Plan: Imported from GitHub, without a `Test Plan:` line. **Static Docs Preview: relay** |[Full Site](https://our.intern.facebook.com/intern/staticdocs/eph/D32182841/V2/relay/)| |**Modified Pages**| Reviewed By: captbaritone Differential Revision: D32182841 Pulled By: alunyov fbshipit-source-id: 6887c42afddc7fd2a349fd703967cc51adf511a1
So, no one found the root cause? Is closing this issue for a doc fix the right path? |
I followed the Step-by-step Guide for v12.0.0 using the yarn-commands. Everything works fine, except when executing the very last command -
yarn start
in step 5 - I get this error output:I double- and triple-checked all steps, verified the schema is saved in UTF-8, stripped out everything from the App.js file except the graphql query, ran
yarn run relay-compiler
directly, successfully tested the query string with the GitHub GraphQL API Explorer, added and removed whitespace in the query, tested other queries composed with the GitHub GraphQL API Explorer, modified the name of the query, changed App.js toexport default App;
instead ofAppRoot
, downgraded the related packages from^12.0.0
to^11.0.0
, but all to no avail. The error remains:ERROR:
Invalid AST Node: { kind: "Root", operation: "query", loc: { kind: "Source", start: 3, end: 105, source: [Source] }, metadata: null, name: "AppRepositoryNameQuery", argumentDefinitions: [], directives: [], selections: [[Object]], type: Query }.
The text was updated successfully, but these errors were encountered: