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

[graphql-language-service]: TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be one of type string or Buffer. Received type object #1319

Closed
yoshiakis opened this issue Feb 6, 2020 · 5 comments · Fixed by #1381

Comments

@yoshiakis
Copy link
Contributor

yoshiakis commented Feb 6, 2020

graph-language-service doesn't return an error message that shows what you need to do.

how to reproduce

Run one of the following commands in the root of package graphql-language-service, then you got the same error message as the title.
bin/graphql.js autocomplete --text foo --schemaPath ...
bin/graphql.js outline --text foo
bin/graphql.js validate --text foo --schemaPath ...
(Before running these scripts, you need to run yarn build in advance.)

cause

error given at

process.stderr.write(error);

or
process.stderr.write(error);

or
process.stderr.write(error);

is actually type object, though process.stderr.write method doesn't allow for type object. Therefore, the method throws an error.

@yoshiakis
Copy link
Contributor Author

I've almost done to fix this issue at my local branch. Soon I'll PR for this.

@acao
Copy link
Member

acao commented Feb 6, 2020

thanks @yoshiakis! we have an outstanding bug for this: #1306

@acao
Copy link
Member

acao commented Feb 6, 2020

we're already underway with a fix. which needs to be in graphql-language-service-server, is that where your fix is?

@yoshiakis
Copy link
Contributor Author

@acao Although this issue looks similar to #1306, it seems the cause of this issue is different from the cause of #1306.

@acao
Copy link
Member

acao commented Feb 7, 2020

i’ll get a chance to take a closer look next week probably

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