figma / code-connect

A tool for connecting your design system components in code with your design system in Figma
MIT License
887 stars 66 forks source link

why "Failed to fetch components from Figma: unable to get local issuer certificate" occur?? #189

Open siosio34 opened 5 days ago

siosio34 commented 5 days ago

Please provide:

An error message similar to the title occurs, but I am curious about when this error message occurs.

siosio34 commented 5 days ago

I followed the code and it seems that the issue occurs below. Is the SSL certificate of the figma API server incorrect? Or is this issue only happening to me?

image
tomduncalf-figma commented 7 hours ago

Hi @siosio34, I suspect you are behind a proxy/firewall which modifies HTTPS certificates, so the certificate chain cannot be validated.

You could try setting the environment variable NODE_TLS_REJECT_UNAUTHORIZED to 0, e.g. by running figma like NODE_TLS_REJECT_UNAUTHORIZED=0 npx figma connect.... This does mean that your connection to Figma will be potentially insecure, so please ensure this is expected and that you're OK with this.