mikaelvesavuori / figmagic

Figmagic is the missing piece between DevOps and design: Generate design tokens, export graphics, and extract design token-driven React components from your Figma documents.
https://docs.figmagic.com
MIT License
807 stars 71 forks source link

Attempting to fetch data from Figma API; Error occurred while using the Figma API: "Error: connect ECONNREFUSED ::1:443" #189

Closed whoiskatrin closed 1 year ago

whoiskatrin commented 1 year ago

Describe the bug Attempting to fetch data from Figma API; Error occurred while using the Figma API: "Error: connect ECONNREFUSED ::1:443"

To Reproduce Steps to reproduce the behavior: Option 1: tried running ./node_modules/figmagic/build/index.js --token {working_token} --url https://www.figma.com/file/7Otf78XDWzbvwHZQL7CCQ7/Figmagic-%E2%80%94-Design-System-template-4.0-\(Community\)\?node-id\=2605-12\&t\=2FYBx3hvpE0IdN5f-0

Option 2: tried running npx figmagic --token {working_token} --url https://www.figma.com/file/7Otf78XDWzbvwHZQL7CCQ7/Figmagic-%E2%80%94-Design-System-template-4.0-\(Community\)\?node-id\=2605-12\&t\=2FYBx3hvpE0IdN5f-0

Expected behavior Generation to start and API being accessed

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

mikaelvesavuori commented 1 year ago

I can't reproduce this issue, either with the full URL as you have shown, or with the better short-hand format npx figmagic --token TOKEN --url 7Otf78XDWzbvwHZQL7CCQ7 (note how this uses only the file ID).

The error, ECONNREFUSED, could be connected either to issues either with the URL, given the full and extreme length of it (i.e. opt for the short-hand, as per above), or to some other network-related issue on your end.

I tried to reproduce both in the actual source, as well as in a blank project pulling the latest Figmagic, using VS Code and Mac OS-native Terminal.

whoiskatrin commented 1 year ago

@mikaelvesavuori the url is the one that suggested in the README and docs, but you are right, the short-hand format worked well, thank you