gpt4 book ai didi

javascript - (Gatsby-Strapi) 错误 : Request failed with status code 404

转载 作者:行者123 更新时间:2023-12-05 06:13:41 31 4
gpt4 key购买 nike

我想按照说明进行操作:https://strapi.io/blog/building-a-static-website-using-gatsby-and-strapi#allowaccess

但是遇到Error: Request failed with status code 404

Node.js 版本:v10.13.0npm 版本:6.14.6斯特拉皮版本:3.1.0-alpha.5操作系统:苹果

哪个例子导致了问题?strapi.io/blog/building-a-static-website-using-gatsby-and-strapi#allowaccess

当前的行为是什么?Graphql 查询不起作用。

重现问题的步骤:

$ gatsby develop
success open and validate gatsby-configs
success load plugins - 2.011s
success onPreInit - 0.004s
success initialize cache - 0.018s
success copy gatsby files - 0.102s
success onPreBootstrap - 0.017s
success createSchemaCustomization -
info Starting to fetch data from Strapi
info Starting to fetch data from Strapi
info Starting to fetch data from Strapi

ERROR #11321 PLUGIN

"gatsby-source-strapi" threw an error while running the sourceNodes lifecycle:

Request failed with status code 404

Error: Request failed with status code 404

createError.js:16 createError
[portfolio_v4]/[gatsby-source-strapi ]/[axios]/lib/core/createError.js:16 :15

settle.js:18 settle
[portfolio_v4]/[gatsby-source-strapi ]/[axios]/lib/core/settle.js:18:12

http.js:202 IncomingMessage.handleSt reamEnd
[portfolio_v4]/[gatsby-source-strapi ]/[axios]/lib/adapters/http.js:202:1 1

task_queues.js:84 processTicksAndRej ections
internal/process/task_queues.js:84:2 1

预期的行为是什么?预期的行为是什么?

当我尝试从 gatsby 获取时不起作用http://localhost:8000/___graphql

http://localhost:8000/___graphql 上没有方法allStrapiblogs

最佳答案

请分享您的 gatsby-config.js 屏幕,gatsby-source-strapi 部分。

这可能是 gatsby-source-strapi 中的 collectionTypes/singleTypes 引起的,或者你的 strapi 中的 USERS & PERMISSIONS PLUGIN (roles) 没有设置

关于javascript - (Gatsby-Strapi) 错误 : Request failed with status code 404,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63212938/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com