How to debug a specific Gatsby package on build

Estimated 1 minute read · Saturday, 28 May 2022

I got an error and needed to get verbose logs for a particular package during a Gatsby build.

I came across this issue on GitHub with reference to a DEBUG env var that can be set to get better logs.

Copy
DEBUG=gatsby:gatsby-plugin-sharp npm run build
We use essential cookies to make our site work. With your consent, we may also use non-essential cookies to improve user experience and analyze website traffic. By clicking 'Accept', you agree to our website's cookie use as described in our Privacy Policy.