Coder Social home page Coder Social logo

henrikwirth / gatsby-starter-wordpress-advanced Goto Github PK

View Code? Open in Web Editor NEW
61.0 61.0 25.0 5.31 MB

Gatsby WordPress Starter Advanced - Tutorial

Home Page: https://gatsby-starter-wordpress-advanced.netlify.com/

License: MIT License

JavaScript 74.48% CSS 25.52%
gatsby wordpress wordpress-gatsby wpgraphql

gatsby-starter-wordpress-advanced's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

gatsby-starter-wordpress-advanced's Issues

Error: ENOENT: no such file or directory

Having issues running gatsby build with starter theme. Seems like there is some path issue:

C:\Users\Tobias\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\yoga-layout-prebuilt\yoga-layout\build\Release\nbind.js:53
throw ex;
^
Error writing tmp-/ template: Error: ENOENT: no such file or directory, open 'C:\Users\Tobias\Desktop\Gatsby\gatsby-starter-wordpress-advanced.template-cache\tmp-.js'

I've also tried with gatsby clean to clear the cache. I have also tried deleting .template-cache folder & node_module folder and ran npm install. The issue still remains.

Cannot destructure property `wpgraphql` of 'undefined' or 'null'

Yarn Start produces the following error

ERROR #11321  PLUGIN

"gatsby-node.js" threw an error while running the createPagesStatefully lifecycle:

Cannot read property 'uri' of null

   9 | 
  10 | exports.createPagesStatefully = async ({ graphql, actions, reporter }, options) => {
> 11 |   await createPages({ actions, graphql, reporter }, options)
     |   ^
  12 |   await createPosts({ actions, graphql, reporter }, options)
  13 | }
  14 | 

File: gatsby-node.js:11:3

  TypeError: Cannot read property 'uri' of null
  
  - createPages.js:107 
    /Users/dlindberg/Code/dl-gatsby-wpgql/create/createPages.js:107:30  
  - Array.map
  
  - createPages.js:106 
    /Users/dlindberg/Code/dl-gatsby-wpgql/create/createPages.js:106:24  
  - task_queues.js:93 processTicksAndRejections
    internal/process/task_queues.js:93:5
  
  - createPages.js:104 async module.exports
    /Users/dlindberg/Code/dl-gatsby-wpgql/create/createPages.js:104:3
  
  - gatsby-node.js:11 async Object.exports.createPagesStatefully
    /Users/dlindberg/Code/dl-gatsby-wpgql/gatsby-node.js:11:3
  

failed createPagesStatefully - 0.484s

The GraphQL query from createPages.js

    query GET_PAGES($first:Int $after:String) {
        wpgraphql {
            pages(
                first: $first
                after: $after
                # This will make sure to only get the parent nodes and no children
                where: {
                    parent: null
                }
            ) {
                pageInfo {
                    hasNextPage
                    endCursor
                }
                nodes {                
                    id
                    title
                    pageId
                    content
                    uri
                    isFrontPage
                }
            }
        }
    }

yields the following errors in GraphiQL:

{
  "errors": [
    {
      "message": "Internal server error",
      "path": [
        "wpgraphql",
        "pages",
        "nodes",
        0,
        "isFrontPage"
      ],
      "extensions": {
        "category": "internal"
      },
      "stack": [
        "GraphQLError: Internal server error",
        "    at Object.relocatedError (/Users/dlindberg/Code/dl-gatsby-wpgql/node_modules/@graphql-tools/utils/index.cjs.js:3483:12)",
        "    at mergeDataAndErrors (/Users/dlindberg/Code/dl-gatsby-wpgql/node_modules/@graphql-tools/delegate/index.cjs.js:1404:34)",
        "    at /Users/dlindberg/Code/dl-gatsby-wpgql/node_modules/@graphql-tools/delegate/index.cjs.js:1432:66",
        "    at Array.forEach (<anonymous>)",
        "    at mergeDataAndErrors (/Users/dlindberg/Code/dl-gatsby-wpgql/node_modules/@graphql-tools/delegate/index.cjs.js:1430:27)",
        "    at /Users/dlindberg/Code/dl-gatsby-wpgql/node_modules/@graphql-tools/delegate/index.cjs.js:1432:66",
        "    at Array.forEach (<anonymous>)",
        "    at mergeDataAndErrors (/Users/dlindberg/Code/dl-gatsby-wpgql/node_modules/@graphql-tools/delegate/index.cjs.js:1430:27)",
        "    at checkResultAndHandleErrors (/Users/dlindberg/Code/dl-gatsby-wpgql/node_modules/@graphql-tools/delegate/index.cjs.js:1393:38)",
        "    at CheckResultAndHandleErrors.transformResult (/Users/dlindberg/Code/dl-gatsby-wpgql/node_modules/@graphql-tools/delegate/index.cjs.js:1389:16)",
        "    at /Users/dlindberg/Code/dl-gatsby-wpgql/node_modules/@graphql-tools/delegate/index.cjs.js:1576:40",
        "    at Array.reduceRight (<anonymous>)",
        "    at Transformer.transformResult (/Users/dlindberg/Code/dl-gatsby-wpgql/node_modules/@graphql-tools/delegate/index.cjs.js:1575:37)",
        "    at /Users/dlindberg/Code/dl-gatsby-wpgql/node_modules/@graphql-tools/delegate/index.cjs.js:1664:36",
        "    at processTicksAndRejections (internal/process/task_queues.js:93:5)",
        "    at async Promise.all (index 0)"
      ]
    },
...

Appreciate your help as I work through this very helpful tutorial

Error - wpgraphql is undefined

` ERROR #11321 PLUGIN

"gatsby-node.js" threw an error while running the createPagesStatefully lifecycle:

Cannot read property 'wpgraphql' of undefined

6 | exports.createPagesStatefully = async ({ graphql, actions, reporter }, options) => {
7 |

8 | await createPages({ actions, graphql, reporter }, options)
| ^
9 | await createPosts({ actions, graphql, reporter }, options)
10 | }
11 |

File: gatsby-node.js:8:3`

What I did -

-> Cloned the repo
-> npm install
-> created .env.development and entered wordpress url
-> gatsby develop returns above error
-> hardcoded wordpress url but still error remains
-> ran npm install dotenv gatsby-source-graphql (thought had to install them separately)
-> still error remains

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.