-
-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Hello,
I'm testing figma export cli, in the goal of exporting svgs from figma file.
I created a Personal Access Token, and checked that using it through curl commands works fine.
But the same thing does not work through @figma-export/cli
I get the following error whatever the configuration I use
✖ fetching document
Error: while fetching file "tGSuhDDoppmJXa8Y5Pinq8": Request failed with status code 400
at /Users/helier_e/Dev/tests/figma/figma-export-cli/node_modules/@figma-export/core/dist/lib/export-components.js:21:15
at processTicksAndRejections (node:internal/process/task_queues:96:5)
I use this npm script : dotenv figma-export use-config
With an .env file providing FIGMA_TOKEN, and the following .figmaexportrc.js
file content
module.exports = {
commands: [
[
"components",
{
fileId: "tGSuhDDoppmJXa8Y5Pinq8",
outputters: [
require("@figma-export/output-components-as-svg")({
output: "./dist/svg",
}),
],
},
],
],
};
Any hint on how I can debug this ?
I'm operating through a corporate proxy, but curl commands work (I have HTTP_PROXY and HTTPS_PROXY env vars defined)
I thing it uses axios internally, that should also take into account HTTP_PROXY env vars.
Am I missing something ? Or how can I debug the error further ?