question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issues using { Client }

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
delvedorcommented, Apr 12, 2019

Yes @delvedor, i’m using React client-side

This client is not intended to be used in a browser environment. Contact Elasticseach directly from the browser exposes you to many security risks and we do not support that.

(are you italian? Really? 😃)

Yes.

0reactions
tdossettcommented, Nov 1, 2019

Hi Travis,

I ended up following your lead and did the following:

axios_call

  1. I used ‘axios’ to perform the https get request (normally I had ‘url’ and ‘auth’, but wanted to be more specific).

elsaticsearch_yml_settings

  1. In my Elastic subscription I enable ‘cors’. AND NOW IT WORKS in Heroku ….

Thank You Again 😊 …

Read more comments on GitHub >

github_iconTop Results From Across the Web

9 Common Client Problems (And How To Prevent Them)
1. Stalled on Content · 2. The Angry Client · 3. Differing Expectations · 4. Disappearing Clients · 5. Your Attitude · 6....
Read more >
11 Common Client Problems and How To Deal With Them
Problem 1: Differing Expectations · Problem 2: Stalled contents that halt progress · Problem 3: Unreasonable client demands · Problem 4: Nonstop ...
Read more >
How to deal with difficult clients (and avoid them!) | Ignition Blog
1. Stay calm, no matter how upset the client gets · 2. Listen and empathize with your client and their concerns · 3....
Read more >
10 Common Customer Service Problems and How to Resolve ...
8. When Customer Service Does Not Follow Through with Promise. If the customer service department is unable to offer an instant solution to...
Read more >
9 Introduction to Client Issues - Java - Oracle Help Center
General Steps to Troubleshoot an Issue · Identify the symptom: Identify the Type of Issue. Find the problem area. · Eliminate non-issues: Ensure...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found