Algolia 无法在 netlify 部署上建立索引

编程入门 行业动态 更新时间:2024-10-26 20:35:50
本文介绍了Algolia 无法在 netlify 部署上建立索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在 netlify 上部署时出现以下错误

On netlify I get the following error when deploying

10:12:15 PM: Algolia: 1 queries to index 10:12:16 PM: Algolia: query 0: executing query 10:12:16 PM: Algolia: query 0: graphql resulted in 230 records 10:12:16 PM: Algolia: query 0: splitting in 1 jobs 10:12:16 PM: error failed to index to Algolia 10:12:16 PM: 10:12:16 PM: 10:12:16 PM: TypeError: Cannot read property 'addObjects' of undefined 10:12:16 PM: 10:12:16 PM: - gatsby-node.js:161 10:12:16 PM: [repo]/[gatsby-plugin-algolia]/gatsby-node.js:161:43 10:12:16 PM: 10:12:16 PM: - Array.map 10:12:16 PM: 10:12:16 PM: - gatsby-node.js:160 doQuery 10:12:16 PM: [repo]/[gatsby-plugin-algolia]/gatsby-node.js:160:30 10:12:16 PM: 10:12:16 PM: - async Promise.all 10:12:16 PM: 10:12:16 PM: - gatsby-node.js:187 async Object.exports.onPostBuild 10:12:16 PM: [repo]/[gatsby-plugin-algolia]/gatsby-node.js:187:5 10:12:16 PM: 10:12:16 PM: 10:12:16 PM: not finished onPostBuild - 1.338s

但是当我执行 gatsby build 时,我得到以下内容

But when I do gatsby build I get the following

Algolia: 1 queries to index Algolia: query 0: executing query Algolia: query 0: graphql resulted in 230 records Algolia: query 0: splitting in 1 jobs Algolia: query 0: moving copied index to main index ⠼ onPostBuild info Generated public/sw.js, which will precache 9 files, totaling 446903 bytes. The following pages will be precached: /offline-plugin-app-shell-fallback/index.html success onPostBuild - 6.228s

在执行 gatsby serve 之后,我发现当我在搜索栏中输入查询时,我可以很好地看到我的帖子结果.但是,每当我点击帖子时,我都会链接到一个奇怪的根目录,例如 0.0.7.226/post-name.

After doing gatsby serve I see that I can see my posts results fine as I type through queries in the searchbar. However, whenever I click on a post, I get linked to a strange root such as 0.0.7.226/post-name.

我最近卸载了所有节点模块并重新安装以确保我的依赖项是最新的.是什么让我出现这个错误?

I recently uninstalled all node modules and reinstalled to make sure my dependencies are up to date. What is getting me this error?

我的github

推荐答案

更新了 netlify 上的 env 变量以成功部署网站,但 0.0.7.226/post-name url 仍然存在

Updated the env variables on netlify to successfully deploy the website but the 0.0.7.226/post-name url persists

更多推荐

Algolia 无法在 netlify 部署上建立索引

本文发布于:2023-11-28 19:49:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1643732.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:索引   Algolia   netlify

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!