[graphql-language-service]: TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be one of type string or Buffer. Received type object
See original GitHub issuegraph-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 https://github.com/graphql/graphiql/blob/917c3931634cf27eb31a0383ff7c15ffd902d221/packages/graphql-language-service/src/client.ts#L105
or
https://github.com/graphql/graphiql/blob/917c3931634cf27eb31a0383ff7c15ffd902d221/packages/graphql-language-service/src/client.ts#L134
or
https://github.com/graphql/graphiql/blob/917c3931634cf27eb31a0383ff7c15ffd902d221/packages/graphql-language-service/src/client.ts#L148
is actually type object, though process.stderr.write
method doesn’t allow for type object. Therefore, the method throws an error.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top GitHub Comments
i’ll get a chance to take a closer look next week probably
@acao Although this issue looks similar to #1306, it seems the cause of this issue is different from the cause of #1306.