Closed tomevans00 closed 2 years ago
Hey @tomevans00!
Sounds weird. This is most likely some formatting or encoding issue. Please verify your Figmagic version; it should be 4.4.5
.
I just tested successfully using the below:
# Check Node version; should be recent (starting with 15-16 should work)
node -v
# Create directory, install, create .env file
mkdir figmagic-demo
cd figmagic-demo/
npm install figmagic -D
npx figmagic init
touch .env
# Add values; "URL" (document ID) used is for the template
echo "FIGMA_TOKEN=your-token-here" >> .env
echo "FIGMA_URL=K39TRbltDVcWFlpzw9r7Zh" >> .env
# Run
npx figmagic
Quick update. As expected, .env
files will be very strict in their formatting if they are to work as intended. For example, this will break:
FIGMA_TOKEN="your-token-here"
FIGMA_URL="K39TRbltDVcWFlpzw9r7Zh"
Same with this, which will also break:
FIGMA_TOKEN = "your-token-here"
FIGMA_URL = K39TRbltDVcWFlpzw9r7Zh
As in the last comment, the correct approach looks like:
FIGMA_TOKEN=your-token-here
FIGMA_URL=K39TRbltDVcWFlpzw9r7Zh
Hey Mikael, following these instructions seemed to do the trick! I guess it was some formatting issue on my end. Thank you for your help!
Hello,
Me and my team work for a big enterprise and would love to use Figmagic in our design system. However, we're unable to successfully run
figmagic
Describe the bug Figmagic does not recognize token and url no matter how it is passed. Always giving this error when running
figmagic
to generate JSON dump:Error: Missing one or more of required arguments: "figmaToken", "figmaUrl" when attempting to get data from Figma API!
To Reproduce Steps to reproduce the behavior, as per the documentation: https://github.com/mikaelvesavuori/figmagic#using-figmagic
figmagic init
from command line to createfigmagic.json
file.env
file in directory, add FIGMA_URL and FIGMA_TOKEN varsnpx figmagic
Error: Missing one or more of required arguments: "figmaToken", "figmaUrl" when attempting to get data from Figma API!
figmagic.json
, same resultExpected behavior Expected to generate a folder of the raw Figma JSON dump
Desktop (please complete the following information):
Additional context
--debug
you can see the token and url are indeed set in the user configuration