Unable to get local issuer certificate using gatsby

I get an "unable to get local issuer certificate" error when using gatsby develop related to FetchError: request to https://....prismic.io/api/v2?access_token

Is there an option to set ignoreSSL: true or something similar?

Thanks

Hey Tobias, welcome to the forum!

If you have a private repository, you'll need to add a token to access the API. Setting this key in environment variables makes them private inside your project.

Is there a particular reason you'd like to avoid this step?

To add

process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'

to gatsby-config.js helped. For now during development I guess that's fine. It's not something for production:

(node:25909) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.

This issue has been closed due to inactivity. Flag to reopen.