Sorry, that I can't help more, but my time will be super limited for the next 1-2 months :/
But from what I can see in your error messages:
Error writing tmp-portfolio/ template: Error: ENOENT: no such file or directory, open 'C:\Users\bjorn\www\blackalscozaV4\.template-cache\tmp-portfolio\.js'
Error writing tmp-/new-page/ template: Error: ENOENT: no such file or directory, open '.template-cache/tmp-/new-page/.js'
It seems to be a path problem. First of all both have a slash or backslash (Windows) in front of the .js So for Björn it seems to be the only problem.
For you Ezra, it seems there is more going on. The path should rather look like this:
writing tmp-new-page/ template: open '.template-cache/tmp-new-page.js'
Maybe this helps to debug my code:
Go to create/utils.js
In Line 53 you find the function createPageWithTemplate
In line 64 add a console output like console.log(page.uri)
See what it outputs
My guess is, that your page.uri has a slash before and/or after. This will lead to problems in this setup. You'd need to make sure it does not include slashes. Actually when I look at it, it might make more sense to use page.slug instead. For that you would need to add it to src/templates/page/data.js.
You would also need to be sure though, that there is no duplication of a slug. Otherwise it will overwrite the template from the duplication.
Did anyone find a solution to this? I am having the same issue. I'm on a Windows PC:
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'
Hi guys, I updated the code and tutorial. There were some path issues with the new WPGraphQL version. I tested it now on my Windows PC and it works for me. Checkout the master or part-7 branch and see if it solves your issues now.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Sorry, unfortunately not.
Sorry, that I can't help more, but my time will be super limited for the next 1-2 months :/
But from what I can see in your error messages:
It seems to be a path problem. First of all both have a slash or backslash (Windows) in front of the
.js
So for Björn it seems to be the only problem.For you Ezra, it seems there is more going on. The path should rather look like this:
Maybe this helps to debug my code:
create/utils.js
createPageWithTemplate
console.log(page.uri)
My guess is, that your page.uri has a slash before and/or after. This will lead to problems in this setup. You'd need to make sure it does not include slashes. Actually when I look at it, it might make more sense to use
page.slug
instead. For that you would need to add it tosrc/templates/page/data.js
.You would also need to be sure though, that there is no duplication of a slug. Otherwise it will overwrite the template from the duplication.
Thanks Henrik. Have been a bit overloaded. Will get back to this in due time and will check out your suggestions.
Did anyone find a solution to this? I am having the same issue. I'm on a Windows PC:
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'
Hi guys, I updated the code and tutorial. There were some path issues with the new WPGraphQL version. I tested it now on my Windows PC and it works for me. Checkout the master or part-7 branch and see if it solves your issues now.