question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[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 issue

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 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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
acaocommented, Feb 7, 2020

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

1reaction
yoshiakiscommented, Feb 7, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

The "chunk" argument must be one of type string or Buffer ...
I have tried process.stdout.write(""+sum); and it worked for me.
Read more >
The "data" argument must be of type string or an instance of
So the error is saying the data (second argument of the fs.writeFileSync function) should be a string or a buffer...etc but instead got...
Read more >
The "chunk" argument must be one of type string or Buffer ...
TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be one of type string or Buffer. Received type object.
Read more >
TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument ...
... The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an ... Received an instance...
Read more >
Cordova Fcm Plugin: The "Chunk" Argument Must Be Of Type ...
the chunk argument must be one of type string or buffer.received type object ... 'string' && !chunk instanceof Buffer { ; throw new...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found