我试图用Auth0和Redux实现盖茨比
由于Auth0和Redux都需要在gatsby-browser.js中使用wrapRootElement,我如何将两者合并才能在盖茨比中成功地使用它们?提前感谢
gatsby-browser.js
// used by Auth0
export const wrapRootElement = ({ element }) => {
return <SessionCheck>{element}</SessionCheck>
}
// used by Redux
export { default as wrapRootEl
我在创建一个gatsby插件。在开发时,我没有收到任何错误或警告,但是我无法在graphiql (或http://localhost:8000/___graphql)中看到我的查询。 module.exports = {
siteMetadata: {
title: `Gatsby Default Starter`,
description: `Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gats
我已经将gatsby-plugin-layout安装到我的项目文件中,创建了src/layouts/index.js,并将gatsby-plugin-layout添加到gatsby-config.js中。Gatsby应用程序编译并可以在开发服务器上服务,但是通过我的布局组件的console.log输出,我看到布局组件仍然在每个页面加载上重新挂载。我的目标是让布局组件在反应应用的过程中只挂载一次。
src/layouts/index.js
import React from "react"
import Header from "../components/header&
我对Gatsby,React和GraphQL还是个新手,所以我只是想在走错路之前和社区确认一下……
WooCommerce REST API (通过WordPress REST API)是否可能成为Gatsby的电子商务集成?如果是,是否可以使用GraphQL查询WooCommerce API (类似于使用gatsby-source-wordpress插件查询WordPress REST API )?仅仅使用WordPress REST API就可以完成这一切吗?
如果有人将WooCommerce与Gatsby集成在一起(或者知道Gatsby电子商务解决方案工作得更好),我很想了解它!
我在Gatsby中遇到了一个奇怪的错误,因为我添加了代码语法突出显示,所以我尝试托管发生的website.This。奇怪的是,当我在本地本地运行它时,它工作得非常好,但是当我使用Gatsby构建它时,它却失败了。(盖茨比云使用我的网站的github回购)
我得到的错误消息是:
There was a problem loading plugin /usr/src/app/www/node_modules/@gatsby-cloud-pkg/gatsby-plugin-preview/dist/index.js. Perhaps you need to install its package?
所以,我跟随this Gatsby训练营。我在第10节,讲师正在展示如何从文件系统获取内容。我安装了用gatsby (gatsby-source-filesystem)访问文件系统的插件/依赖项,并在gatsby-config.js文件中添加了必要的配置。它看起来是这样的: /**
* Configure your Gatsby site with this file.
*
* See: https://www.gatsbyjs.com/docs/gatsby-config/
*/
module.exports = {
/* Your site config here */
我刚把盖茨比更新为v3。在此之前,我刚刚将gatsby-source-wordpress更新为v5,并且所有内容都在使用Gatsby v2.32.9。
现在,在执行gatsby develop时,我得到以下消息:
info gatsby-source-wordpress
This is either your first build or the cache was cleared.
Please wait while your WordPress data is synced to your Gatsby cache.
Maybe now's a goo
我得到以下错误,试图从盖茨比插件-黑暗模式导入ThemeToggler。
module "C:/Users/Karim Elnemr/Desktop/my-gatsby-website/node_modules/gatsby-plugin-dark-mode/index"
Could not find a declaration file for module 'gatsby-plugin-dark-mode'. 'C:/Users/Karim Elnemr/Desktop/my-gatsby-website/node_modules/gatsby-pl
我试图使用Gatsby和Firebase的数据以编程方式创建Gatsby页面。我已经成功地设置了所有内容,直到可以通过GraphQL访问Firebase数据为止,现在我想查询使用id (以字符串格式创建的)每个新页面的具体数据。但是,当我创建模板组件并尝试查询数据时,我会得到以下错误:
Variable "$clientId" of type "String!" used in position expecting type "StringQueryOperatorInput".
我已经到处寻找这个StringQueryOperatorInput
我完全被困住了。
使用GatsbyJS设置GatsbyJS 1,并响应16 +最新的Firebase 5.5.7
在开发模式下,一切都很好,但是当我尝试构建时,我总是得到:WebpackError: _firebase2.default.initializeApp is not a function
如果导入的话,我已经尝试了以下所有类型,并且它们都导致了这个错误:import firebase from 'firebase'; // const firebase = require('firebase/app') // import * as firebase