elastic / elasticsearch-js

Official Elasticsearch client library for Node.js
https://ela.st/js-client
Apache License 2.0
5.24k stars 725 forks source link

Nuxt 3 compatibility #2131

Closed lennarddevelop closed 1 month ago

lennarddevelop commented 7 months ago

💬 Questions and Help

When in Nuxt 3 I want to use the Client. I keep getting the same error: "Class extends value undefined is not a constructor or null." Here I made a minimal reproduction of the problem. https://stackblitz.com/edit/github-zqjbfo-k8daox?file=app.vue

JoshMock commented 7 months ago

@lennarddevelop What environment are you running your Nuxt code in? We have an open issue around supporting edge compute environments, so if that's where you're seeing problems, it's because we haven't built support for it yet

haidertm commented 4 months ago

Getting same issue, using nuxt version 3.8.1

image

matthieuv-chabe commented 1 month ago

still nothing ?

lennarddevelop commented 1 month ago

I could not make this work. So I skipped it.

Now I just connect to the "client" in the server directory. https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/client-connecting.html

Then you can just use useFetch from a component and fetch the elastic data.