Issues using @elastic/elasticsearch [ElasticSearch Version 7.0.0]

Hi, i'm trying to use the es client with Es6 + React, for connect my app into the elastic cloud using the code from the examples:
import { Client } from '@elastic/elasticsearch'; const client = new Client({ cloud: { id: 'Cloud-Name:Cloud-Id', username: 'elastic', password: 'my-password' } });

But when i launch the program it takes me this error

[ConnectionPool.js:375] Uncaught TypeError: URL is not a constructor

what could be the issue?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.