在React代码库中使用ElasticSearch

时间:2019-06-11 22:22:12

标签: reactjs elasticsearch redux

无法将Elastic Search集成到React应用中。

遵循的步骤在这里:https://www.elastic.co/blog/how-to-build-application-search-with-react-and-elastic-app-search

卡在进食步骤上

运行此命令时

REACT_APP_HOST_IDENTIFIER={Your Host Identifier} \
REACT_APP_API_KEY={Your Private API Key} \
npm run index-data

我收到以下错误:

Demo-React/app-search-demo-react/node_modules/request/index.js:53:10)
    at Promise (../app-search-demo-react/node_modules/swiftype-app-search-node/lib/client.js:42:7)
    at new Promise (<anonymous>)
    at Client._wrap (/../app-search-demo-react/node_modules/swiftype-app-search-node/lib/client.js:41:12)
    at Client._jsonRequest (../app-search-demo-react/node_modules/swiftype-app-search-node/lib/client.js:25:17)
    at Client.post (../app-search-demo-react/node_modules/swiftype-app-search-node/lib/client.js:17:17)
(node:15416) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 26)
(node:15416) UnhandledPromiseRejectionWarning: Error: no auth mechanism defined

REACT_APP_HOST_IDENTIFIER = {您的主机标识符} \ REACT_APP_API_KEY = {您的私有API密钥} \ npm运行索引数据

0 个答案:

没有答案