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

Update to elasticsearch v7.16 to fix deprecation warning #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

samhstn
Copy link

@samhstn samhstn commented Jan 27, 2022

We see a deprecated folder mapping warning when using node v16+

(node:97520) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /Users/marcbachmann/Development/livingdocsIO/livingdocs-server/master/node_modules/@elastic/elasticsearch7/package.json.
Update this package.json to use a subpath pattern like "./*".
...

Raised here: elastic/elasticsearch-js#1465
Fixed here: https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/changelog-client.html#_fixed_export_field_deprecation_log_1593

@samhstn
Copy link
Author

samhstn commented Sep 12, 2022

@TheDeveloper any updates here?

@lbeschastny
Copy link

When using Node.js 20 it causes an error on module import:

Uncaught:
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/errors' is not defined by "exports" in /Users/leonbesc/Documents/viaplay/search-index-manager-lambda/search-index-manager-updater-lambda/node_modules/@elastic/elasticsearch/package.json
    at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
    at new NodeError (node:internal/errors:405:5)
    at exportsNotFound (node:internal/modules/esm/resolve:359:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:695:9)
    at resolveExports (node:internal/modules/cjs/loader:567:36)
    at Module._findPath (node:internal/modules/cjs/loader:636:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/Users/leonbesc/Documents/viaplay/search-index-manager-lambda/search-index-manager-updater-lambda/node_modules/aws-elasticsearch-js/index.js:11:5)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants