"`this.splice()` is not a function" error on `vscode-graphql` startup
See original GitHub issueMy VSCode plugin is failing to start, logging the following error:
8/1/2022, 11:58:03 AM [1] (pid: 32510) graphql-language-service-usage-logs: WARNING: graphql-config error, only highlighting is enabled:
this.splice is not a function
and
[Error - 12:05:13 PM] Request textDocument/completion failed.
Message: Request textDocument/completion failed with message: this.splice is not a function
Code: -32603
This is my current .graphqlrc.yml
schema: "http://localhost:4000/_introspect"
maybeValue: T
config:
enumsAsTypes: true
useTypeImports: true
nonOptionalTypename: true
scalars:
Time: number
DateTime: Date
Json: Record<string, unknown>
generates:
app/types/apollo.gql.d.ts:
plugins:
- typescript-apollo-client-helpers
app/types/schema.gql.d.ts:
documents: "**/*.gql"
plugins:
- typescript
app/:
documents: "**/*.gql"
preset: near-operation-file
presetConfig:
baseTypesPath: "types/schema.gql.d.ts"
extension: .gql.d.ts
plugins:
- typescript-operations
- typescript-react-apollo
The same setup was working up to last Friday, and is still working on my colleagues machines.
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:19 (15 by maintainers)
Top Results From Across the Web
TypeError: splice is not a function in JavaScript | bobbyhadz
The "splice is not a function" error occurs when the splice() method is called on a value that is not an array. To...
Read more >splice method returns an error: is not a function - Stack Overflow
I think the splice function returns an error because games[i] is an object, not an array. If you want to use splice on...
Read more >Array.prototype.splice() - JavaScript - MDN Web Docs
If you do not specify any elements, splice() will only remove elements from the array. Return value. An array containing the deleted elements....
Read more >JavaScript Array splice() Method - GeeksforGeeks
JavaScript Array splice() Method · index: It is a required parameter. · remove_count: The number of elements to be removed from the starting...
Read more >Array methods - The Modern JavaScript Tutorial
The arr.splice method is a swiss army knife for arrays. ... own sorting order, we need to supply a function as the argument...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
tested it from the marketplace again with introspection, gql files, everything looks good now!
ok! thank you, this is all very helpful to know, I will see if I can reproduce the issue with this new information! i’m sorry the extension broke for them. I might even just be able to delete the version, reproduce this, and re-try
update:
reproduced it finally! ok I hope to have a fix by tomorrow but maybe tonight if I can get it done before 2am here haha. very sorry for this bug!