ERROR #95313 Building static HTML failed for path "/products/some-link"
See original GitHub issueDescription
I’m trying to deploy project using Vercel but getting this error. I’m using createPages function for each product from Stripe and passing product to template where is error ‘TypeError: Cannot read property ‘product’ of undefined’. Everything works as expected in dev mode but not in production Describe the issue that you’re seeing.
Steps to reproduce
Don’t know right now
Expected result
Project should be deployed without errors.
Actual result
ERROR #95313
Environment
System: OS: macOS 10.15.4 CPU: (4) x64 Intel® Core™ i5-7360U CPU @ 2.30GHz Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.14.0 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.14.5 - /usr/local/bin/npm Languages: Python: 2.7.16 - /usr/bin/python Browsers: Chrome: 81.0.4044.138 Firefox: 76.0.1 Safari: 13.1 npmPackages: gatsby: ^2.21.13 => 2.21.15 gatsby-cli: ^2.12.29 => 2.12.29 gatsby-image: ^2.4.1 => 2.4.2 gatsby-plugin-apollo: ^3.0.1 => 3.0.1 gatsby-plugin-manifest: ^2.4.2 => 2.4.2 gatsby-plugin-offline: ^3.2.1 => 3.2.1 gatsby-plugin-react-helmet: ^3.3.1 => 3.3.1 gatsby-plugin-react-redux: ^1.1.0-0 => 1.1.0-0 gatsby-plugin-sharp: ^2.6.1 => 2.6.1 gatsby-plugin-styled-components: ^3.3.1 => 3.3.1 gatsby-plugin-transition-link: ^1.18.0 => 1.18.0 gatsby-source-filesystem: ^2.3.1 => 2.3.1 gatsby-source-stripe: ^3.0.7 => 3.0.7 gatsby-transformer-sharp: ^2.5.1 => 2.5.1 npmGlobalPackages: gatsby-cli: 2.12.1
Run gatsby info --clipboard
in your project directory and paste the output here.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Hi!
Sorry to hear you’re running into an issue. Error 95313 just means that the HTML could not be built, which is goign to be down to a React error of some type. In this case it probably means that you have no product on that page. To stop the error immediately, add a null check for the object that is supposed to contain
product
. e.g:To help us best begin debugging the underlying cause, it would be really helpful if you’re able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.
Thanks!
It solved my error, thank you!