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.

TypeError: Invalid apiVersion "5.1"

See original GitHub issue

I’ve just provisioned a new cluster in AWS and come across the following:

TypeError: Invalid apiVersion "5.1", expected a function or one of _default, 5.0, 2.4, 2.3, 2.2, 2.1, 2.0, 1.7, 1.6, 1.5, 1.4, 1.3, 1.2, 1.1, 1.0, 0.90, 5.x, master

I’m going to go with 5.0 for now as this is just testing currently.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
sjparkinsoncommented, Feb 7, 2019

The latest versions of elasticsearch-js have a supported list of …

TypeError: Invalid apiVersion "5.1", expected a function or one of _default, 6.6, 6.5, 6.4, 6.3, 6.2, 6.1, 6.0, 5.6, 2.4, 1.7, 0.90, 6.7, 7.0, 7.x, master

But we still have a system on an AWS cluster running 5.1.1.

I believe our resolution is to pin to an older version of elasticsearch-js until we upgrade the cluster.

1reaction
spalgercommented, Feb 7, 2019

At the time of this issue 5.1 was new and unsupported. Now 5.1 is pretty old and the module is just bloated keeping around all of the 5.x APIs, so I trimmed it down to only include the latest from the 5.x branch. For the majority of applications using 5.6 with a 5.1 cluster won’t cause any problems, though it might mean a couple extra methods or parameters that Elasticsearch doesn’t actually support show up. As you can see in https://www.diffchecker.com/8wh77zOR the two API versions are pretty close to identical.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ask Question - Stack Overflow
When running the kubectl CLI, we got an error between kubectl and the EKS tool of the aws-cli . version: 2.1 orbs: aws-ecr:...
Read more >
REST API versioning for Azure DevOps - Microsoft Learn
Learn how versioning works for REST APIs for Azure DevOps.
Read more >
HTTP API — ironic-inspector 5.1.0 documentation
Requires X-Auth-Token header with Keystone token for authentication. Response: 200 - OK; 400 - bad request; 401, 403 - missing or invalid authentication;...
Read more >
Reindex API | Elasticsearch Guide [8.5] | Elastic
Valid values: index , create . Defaults to index . To reindex to a data stream destination, this argument must be create ....
Read more >
Chapter 5. MySQL Cluster API Errors - Oracle Help Center
NDB Error Code MySQL Error Code NDB Error Classification 281 HA_ERR_NO_CONNECTION AE 299 DMEC AE 763 DMEC AE
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