gatsby

normal graphql queries causing errors

最后都变了- 提交于 2019-12-25 01:17:04
问题 I have been searching around for a while and been getting a lot of help from the SO community. But, it seems that the setup of my project isn't allowing normal queries such as sort, limit, filter, or others. I am querying a custom middleware/drupal site. Examples that throw errors: { umdHub(limit: 5) { articles { data { id title subtitle body summary } } } } or { umdHub( sort: { fields: [authorship_date___time] order: ASC } ) { articles { data { id title subtitle body summary authorship_date

Gatsby Deployment to Github Failing

喜欢而已 提交于 2019-12-24 16:35:08
问题 Struggling with this one. I've downloaded and installed locally, this Gatsby starter pack: https://github.com/ChangoMan/gatsby-starter-dimension . And i'm trying to deploy to my github web page: https://reenaverma.github.io/ I've followed the instructions, but keep getting this error when I run npm run deploy: > gatsby-starter-dimension@1.0.0 deploy /Users/reenaverma/development/gatsby-starter-dimension > gatsby build && gh-pages -b master -d public success delete html and css files from

Hosting Gatsby on a subdirectory using NGINX

寵の児 提交于 2019-12-24 08:19:54
问题 How do i host gatsby.js on a subdirectory using nginx, i have already tried to do this using proxy_pass http://127.0.0.1:8000 with gatsby develop but i'm facing issues with Socket.io. Does anyone know how to host gatsby on a subdirectory i've tried using the following rewrite code rewrite ^([^.\?]*[^/])$ $1/ permanent . But that does nothing. Fix Okay so at first i was using gatsby develop so that i can make use of HMR, but i guess beggars can't be choosers, so based on what fabian said, i

Imported Sass file can't find font file

雨燕双飞 提交于 2019-12-24 07:47:42
问题 I'm using gatsby-plugin-sass to include my sass files. I have a web-animations.sass file that imports _typography.sass . My _typography.sass has a font-face declaration like this: @font-face font-family: 'BrandonPrinted' src: url(../../global/fonts/brandonprinted-one-webfont.eot) src: url(../../global/fonts/brandonprinted-one-webfont.eot?#iefix) format('embedded-opentype'), url(../../global/fonts/brandonprinted-one-webfont.woff) format('woff'), url(/src/page-assets/global/fonts/brandonprinted

Gatsby Develop failing : Error: Cannot find module 'gatsby-cli/lib/reporter'

余生颓废 提交于 2019-12-24 01:50:34
问题 Keep getting an error from gatsby-cli when doing gatsby develop command in terminal. Already deleted node-modules and reinstalled using npm. Tried installing Gatsby-Cli as a separate module but that just causes more gatsby-cli errors. Gatsby-cli is a module inside the gatsby module, but I .really don't know why it's causing this error all of a sudden. $ gatsby develop success open and validate gatsby-configs - 0.054 s error Error in Error: Cannot find module 'gatsby-cli/lib/reporter' - loader

How to set and get a datepicker value using antd with formik?

一笑奈何 提交于 2019-12-24 00:38:27
问题 Here i am creating Datepicker with antd and passing this antd datepicker to formik field.My sample code for Datepicker with antd import React from "react"; import { Form, DatePicker } from "antd" import { Field } from "formik"; import moment from 'moment'; const FormItem = Form.Item; function onChange(date, dateString) { console.log(date, dateString); } const dateFormat = "MM-DD-YYYY" // Here i am adding antd error message through DateInput const DateInput = ({ field, form: { touched, errors

Moving global style sheets above styled-components in <head>

こ雲淡風輕ζ 提交于 2019-12-23 22:14:32
问题 I am currently import ing CSS files in one of my components. Those style sheets are added as link tags in <head> , and will be globally available: import './src/styles/normalize.module.css'; I am also using styled-components . Currently, the link tags generated by the global CSS import s land below the styled-component style tags, in <head> : I would like the styled-components to be more specific, i.e. appear above the link tags from the CSS import s. Is there any way to accomplish that? PS:

Export module in front of function vs at end

走远了吗. 提交于 2019-12-23 20:25:26
问题 I am developing an app in GatsbyJS , and export ing one of my GraphQL fragments as such: import { graphql } from 'gatsby'; export const w300Image = graphql` fragment w300Image on File { childImageSharp { fluid(maxWidth: 300) { ...GatsbyImageSharpFluid presentationWidth } } } `; export const squareImage = graphql` fragment squareImage on File { childImageSharp { fluid(maxWidth: 200, maxHeight: 200) { ...GatsbyImageSharpFluid presentationWidth } } } `; I import and use squareImage as such:

react, jquery, gatsby - how to make jquery plugins work in gatsby?

倖福魔咒の 提交于 2019-12-23 19:55:54
问题 Removed previous description as it's not relevant now. I started with fresh gatsby site and able to make jquery, bootstrap, wow and owl carousel work. layout.js import './expose' import './main' expose.js import 'popper.js' import 'bootstrap' import 'animate.css/animate.min.css' import WOW from 'wowjs/dist/wow.js'; import 'owl.carousel/dist/assets/owl.carousel.css'; import 'owl.carousel'; new WOW( { offset: 100, mobile: true, } ).init(); main.js ;(function($){ console.log('hello jquery')

React hooks in Gatsby: Invalid hook call

旧时模样 提交于 2019-12-23 12:55:19
问题 Trying to implement a custom hook from a react example: https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state, but I get the following error: ERROR: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: 1. You might have mismatching versions of React and the renderer (such as React DOM) 2. You might be breaking the Rules of Hooks 3. You might have more than one copy of React in the