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

All 8.x versions of @elastic/elasticsearch now require node v18 #91

Closed
bsherman101 opened this issue Apr 8, 2024 · 4 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@bsherman101
Copy link

bsherman101 commented Apr 8, 2024

Elasticsearch JS Client v 8.9.0 states that it requires a minimum Node version of v14.

https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/8.9/getting-started-js.html

It's package.json has a dependency of @elastic/transport: "^8.3.2"

This previously built without issue with v16 but now because the transport library is available at v8.5.0, that version is being pulled and the build is complaining about the transport and the undici dependencies requiring v18 but current is v16.

@bsherman101 bsherman101 changed the title Elasticsearch JS Client v8.9.0 builds with Unsupported Engine. Now requires node v18 Elasticsearch JS Client v8.9.0 builds with Unsupported Engine Warning. Now requires node v18 Apr 8, 2024
@JoshMock
Copy link
Member

JoshMock commented Apr 8, 2024

There's a lot of overlap here with #90, where we discussed a lot of this at length. But I also understand your point, and can publish patch releases for older 8.x releases to pin to ~8.4.1 to ease some of the pain of this change.

While not ideal, in the meantime you can override the version of @elastic/transport that your projects depend on.

I'll keep this open until I get those patch releases out, hopefully in the next few days.

@JoshMock JoshMock self-assigned this Apr 8, 2024
@JoshMock JoshMock added the bug Something isn't working label Apr 8, 2024
@JoshMock JoshMock changed the title Elasticsearch JS Client v8.9.0 builds with Unsupported Engine Warning. Now requires node v18 8.x versions of @elastic/elasticsearch now require node v18 Apr 8, 2024
@JoshMock JoshMock pinned this issue Apr 8, 2024
@JoshMock JoshMock changed the title 8.x versions of @elastic/elasticsearch now require node v18 All 8.x versions of @elastic/elasticsearch now require node v18 Apr 8, 2024
@bsherman101
Copy link
Author

OK, we decided to go ahead and update our package.json(s) to use the override referenced above until we can migrate to Node 18 or higher.

I do agree with @jsumners-nr comment here #90 (comment)

I don't believe the transport library should be forced to stay within the same versioning paradigm as @elastic/elasticsearch itself. If it requires a major version increment to prevent previous releases from breaking so be it.

@JoshMock
Copy link
Member

JoshMock commented Apr 9, 2024

Historically, transport versions were pinned to the same major/minor version as the client, to ensure that any changes that affect how the client communicates with Elasticsearch via HTTP (or any other protocol) are in alignment with what that version of Elasticsearch supports.

More recently, it's shifted to closer-to-semver versioning, but we are still trying to keep the major version of the transport aligned with the major version of Elasticsearch for the above reasons.

@JoshMock
Copy link
Member

JoshMock commented Apr 9, 2024

The following versions of the client have been published to npm, each of which pins transport to the latest patch version rather than the latest minor, which should resolve this issue.

  • 8.6.1
  • 8.7.3
  • 8.8.2
  • 8.9.2
  • 8.10.1
  • 8.11.1
  • 8.12.3
  • 8.13.1

@jsumners-nr @bsherman101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants