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

Could not retrieve any data. Are you missing a valid API key? #199

Closed ranjith-n-7edge closed 5 months ago

ranjith-n-7edge commented 5 months ago

Figmagic is failing to retrieve data from Figma files, Once i run figmagic it is throwing error even if i provide right access to API Key. I tried all different way to pass the FIGMA_URL and FIGMA_TOKEN in all different ways but no luck Screenshot from 2024-03-27 11-29-07

mikaelvesavuori commented 5 months ago

Hi!

Something is going on on your side, and I don't have very much to go on to support you.

However, I've made you a small Bash script that will set up Figmagic in a working state, so that you can backtrack and learn from there:

#/bin/bash

mkdir figmagic-setup
cd figmagic-setup
npm install -S figmagic

# Change these demo values
echo 'FIGMA_TOKEN=123456-aeae1212-1d1d-1d1d-1d1d-abcdef123456
FIGMA_URL=K39TRbltDVcWFlpzw9r7Zh' >>.env

npx figmagic init

npx figmagic

You didn't mention the OS, though Bash should work on Windows too.

If you can't use Bash, of course feel free to run the commands listed above manually instead.

ranjith-n-7edge commented 5 months ago

Hi @mikaelvesavuori Thank you for your support it works for me I am using Ubuntu OS and if we install the figmagic globally by running npm i figmagic -g then i was getting the above error after using npx figmagic it works Thank you for the quick response