-
Notifications
You must be signed in to change notification settings - Fork 121
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
[BUG] ERR_PACKAGE_PATH_NOT_EXPORTED issue encountered when upgrading to NodeJS 18 runtime #560
Comments
@rayhive thanks for bringing this to our attention. Do you encounter this in other versions of Node as well? Esp the newer ones? |
Hi @nhtruong, thanks for your response. We encountered this issue with the NodeJS 16, as well as 18 runtimes. Ideally we're looking to upgrade our runtime from version 14 to version 18. |
Is there an ETA as it's a kind of a blocker for us ? |
@mahajanvivektech Our integration and unit tests do include 18.x and they don't encounter this error. Lemme see if I can recreate this. |
Is this what you're looking for?
|
Thanks for that @nhtruong, that's resolved the issue running this locally on my workstation - also, I upgraded to @opensearch-project/opensearch 2.3.1. We'll give this a test in the office, otherwise looking good, cheers. |
Glad that was resolved. I'm going to close this ticket then. |
What is the bug?
We've had the "@opensearch-project/opensearch" working in an app running against the Node JS 14 runtime. Howerver we've recently tried upgrading our app's runtime to NodeJS 18 and experience the issue below.
ERROR Uncaught Exception {"errorType":"Error","errorMessage":"Package subpath './lib/errors' is not defined by \"exports\" in /var/task/node_modules/@opensearch-project/opensearch/package.json","code":"ERR_PACKAGE_PATH_NOT_EXPORTED","stack":["Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/errors' is not defined by \"exports\" in /var/task/node_modules/@opensearch-project/opensearch/package.json"," at new NodeError (node:internal/errors:399:5)
How can one reproduce the bug?
Import a module like: import { ResponseError } from '@opensearch-project/opensearch/lib/errors';
What is the expected behavior?
module imports without errors
What is your host/environment?
The text was updated successfully, but these errors were encountered: