-
Notifications
You must be signed in to change notification settings - Fork 728
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
The latest version v7.0.0-rc.1 does not build #803
Comments
Hello! npm i @types/node --save-dev |
I am seeing the same issue with @types/node latest installed. |
@jlausolutions can you write the following info?
|
node: v10.0.0 |
I just tried the following:
import { Client } from '@elastic/elasticsearch'
const client = new Client({ node: 'http://localhost:9200' })
client.info(console.log) And everything works as expected.
|
I just tried updating node (v10.15.3) and ran the same commands you listed, but am seeing the same error:
Note that it compiled if you run |
Sorry, I thought it was obvious, I compiled the file after writing the code. |
It was obvious -- I was just working backwards when it was still not working. In any case, the issue was that I also had Thanks! |
Thanks for the follow-up! |
Hello, I've the same error My system info are:
|
Hello @lazaro9318! |
I'm also having the same problem. It looks just importing @delvedor here is a repo that will case the error when building. https://github.com/alanjames1987/Elasticsearch-TypeScript-Error Pull it, run Additionally, I'm using Node v10.15.3, but since this is TypeScript I doubt it's caused by a problem with Node, but giving more information never hurts. |
I solve the error, deleting the node_modules folder and installing again. |
@lazaro9318 Deleting the |
Additionally, for anyone else having this problem you can install |
Apparently, the issue is caused by this line: elasticsearch-js/lib/Connection.d.ts Line 79 in 2f92b28
Because TypeScript does not know how to handle Symbols, or if it does, it does it really bad. I'll open a pr with a fix. |
I can confirm that this pull request works for me. |
Waiting for this fix on v6.x |
Hello @ariasjose, the fix has already been released in 6.x :) |
🐛 Bug Report
The latest version v7.0.0-rc.1 does not build
To Reproduce
Steps to reproduce the behavior:
Include the module by running the following command
npm install @elastic/elasticsearch --save
Expected behavior
Should build without any errors
However i get the following error
`> tsc
node_modules/@elastic/elasticsearch/lib/Connection.d.ts:77:3 - error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type.
77 [inspect.custom](object: any, options: InspectOptions): string;
~~~~~~~~~~~~~~~~
`
Your Environment
Other observations
Including @types/elasticsearch would solve the issue however the types support is only for version 5.0.23
The text was updated successfully, but these errors were encountered: