Error when deploying on Gatsby Cloud and/or Netlify
See original GitHub issueDescription
I’m getting this error when trying to deploy this site on Netlify or Gatsby Cloud:
8:59:24 PM: error Building static HTML failed for path "/cursos/int2/"
8:59:24 PM: 15 | return (
8:59:24 PM: 16 | <Layout>
8:59:24 PM: > 17 | <SEO title={this.props.data.cursosJson.nome} />
8:59:24 PM: | ^
8:59:24 PM: 18 | <h1>{this.props.data.cursosJson.nome}</h1>
8:59:24 PM: 19 | <p>{this.props.data.cursosJson.descricao}</p>
8:59:24 PM: 20 | </Layout>
8:59:24 PM:
8:59:24 PM: WebpackError: TypeError: Cannot read property 'nome' of null
8:59:24 PM:
8:59:24 PM: - curso.js:17 CursoTemplate.render
8:59:24 PM: src/templates/curso.js:17:52
Steps to reproduce
I’ve tried to reproduce it locally (in 2 machines, deleting caches also) but locally it works (build and develop). Just occurs when trying to deploy do Netlify or Gatsby Cloud.
Expected result
The site should build and deploy.
Actual result
I got the error that I posted.
Environment
System:
OS: macOS 10.15.1
CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.13.0 - ~/.nvm/versions/node/v12.13.0/bin/node
npm: 6.12.0 - ~/.nvm/versions/node/v12.13.0/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Chrome: 80.0.3987.122
Firefox: 73.0.1
Safari: 13.0.3
npmPackages:
gatsby: ^2.19.27 => 2.19.27
gatsby-image: ^2.2.41 => 2.2.41
gatsby-plugin-manifest: ^2.2.42 => 2.2.42
gatsby-plugin-offline: ^3.0.35 => 3.0.35
gatsby-plugin-react-helmet: ^3.1.22 => 3.1.22
gatsby-plugin-sharp: ^2.4.5 => 2.4.5
gatsby-plugin-typescript: ^2.1.27 => 2.1.27
gatsby-source-filesystem: ^2.1.48 => 2.1.48
gatsby-transformer-json: ^2.2.26 => 2.2.26
gatsby-transformer-sharp: ^2.3.16 => 2.3.16
npmGlobalPackages:
gatsby-cli: 2.8.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:10
Top Results From Across the Web
Gatsby Cloud deploying wrong site version to Netlify - Support
I'm trying to deploy a site to Netlify via Gatsby Cloud, however each time I get the following error: Deploy Error from Netlify:...
Read more >Gatsby Build Fails on Netlify Deploy - Stack Overflow
I encountered this error when deploying a gatsby started template, most probably it would have been same for you as well.
Read more >Gatsby Cloud: The Best Netlify Alternative
You might be currently running your Gatsby site on another hosting provider, but there are many use cases where Gatsby Cloud might be...
Read more >Build and deploy Gatsby sites using WordPress, Shifter, Netlify ...
This asks Node.js to ignore the self-signed certificate so you can start the development build and watch. If your gatsby develop command fails ......
Read more >github gatsby
Log into your Gatsby Cloud Dashboard and click on Add a site. It is a simple and clean Git experience!”. Deploying to a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@afucher no need to thank, glad that i was able to help you out and you managed to get a working deploy once again. If you don’t mind i’m going to remove my Netlify/Gatsby cloud deployments and i’ll keep the forked repo temporarly for bit longer, should you want to revisit this. Sounds good?
@afucher no need to thank. I mentioned pulling all the data in
gatsby-node.js
due to the fact that you’re pulling in the same data ingatsby-node.js
and in the template and also based on the fact that the data itself is not that “big”, so with that in mind you could prevent some unnecessary queries to run when the build is triggered. But that’s just me as a bit more experienced with Gatsby and something for you to consider when you’re more knowledgeable of Gatsby.But to be perfectly fair, the current approach you’re taking is fine and something you should use as you expand your knowledge of Gatsby’s data layer and also Gatsby’s workflows and internals.
In my previous comment i forgot to mention the forked repo, when you have a chance, i would like for you to take a look the repo and my response and see if you can get the site to deploy without issues.
Feel free to provide feedback so that we can continue to work on this until we find a suitable solution or close the issue.