sentry-javascript: Failed to build in Heroku for gatsby application
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
SDK Version
7.73.0
Framework Version
Gatsby 5.12
Link to Sentry event
No response
SDK Setup
I tried exactly as https://docs.sentry.io/platforms/javascript/guides/gatsby/#configure and also tried to pass the sentryConfig as the options parameter.
{
resolve: `@sentry/gatsby`,
options: sentryConfig
},
Options was as below.
{
dsn: process.env.SENTRY_DSN,
environment: process.env.NODE_ENV,
release: process.env.SOURCE_VERSION,
enabled: process.env.NODE_ENV === 'production',
ignoreErrors: [ ...],
denyUrls: [...],
}
Steps to Reproduce
This is happening to me in Heroku builds and i am not able to reproduce this locally or anywhere else.
Expected Result
Project to build normally.
Actual Result
The build is failing with the following error. I tried consoling the log and I also see the release value is some hash value. But, it’s failing for unknown reason to me.
error Generating JavaScript bundles failed
Sentry CLI Plugin: Unable to determine version. Make sure to include `release` option or use the environment that supports auto-detection https://docs.sentry.io/cli/releases/#creating-releases
not finished Running gatsby-plugin-sharp.IMAGE_PROCESSING jobs - 25.130s
-----> Build failed
About this issue
- Original URL
- State: open
- Created 8 months ago
- Comments: 15 (8 by maintainers)
This is odd. Unfortunately, all I can recommend is double-checking for any typos, turning logs on, and looking at the log messages.
To investigate this further, we need a small reproduction example, ideally a repo we can clone or a Stackblitz or similar!