package.json의 버전이 안맞아서 문제가 생겼음..
"@elastic/elasticsearch": "^7.12.0",
사용중인 버전과 맞추면 해결됨ㅋㅋ.
저는
package : "@elastic/elasticsearch": "^8.6.2"
centOS : 7.12.0
쓰고있어서 오류가 발생했네요
ProductNotSupportedError: The client noticed that the server is not Elasticsearch and we do not support this unknown product.
at SniffingTransport.request (/Users/gimsihun/Desktop/WORK/@@@/node_modules/@elastic/transport/lib/Transport.js:427:27)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Client.DeleteByQueryApi [as deleteByQuery] (/Users/gimsihun/Desktop/WORK/@@@/node_modules/@elastic/elasticsearch/lib/api/api/delete_by_query.js:50:12)
at async /Users/gimsihun/Desktop/WORK/@@@/router/tools/elasicconn.js:25:22 {
meta: {
body: undefined,
statusCode: 200,
headers: {
'content-type': 'application/json; charset=UTF-8',
'content-length': '215'
},
meta: {
context: null,
request: [Object],
name: 'elasticsearch-js',
connection: [Object],
attempts: 0,
aborted: false
},
warnings: [Getter]
}
}