henrikwirth / gatsby-starter-wordpress-advanced Goto Github PK
View Code? Open in Web Editor NEWGatsby WordPress Starter Advanced - Tutorial
Home Page: https://gatsby-starter-wordpress-advanced.netlify.com/
License: MIT License
Gatsby WordPress Starter Advanced - Tutorial
Home Page: https://gatsby-starter-wordpress-advanced.netlify.com/
License: MIT License
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.
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 #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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.