-
-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Description
I configured the import script according to official website's document. It has been used normally before。However, the execution will fail after the upgrade, and the error message does not provide the error reason.
My figma folder looks like:
My import script:
let res;
try {
res = await importFromFigma({
prefix: 'ast',
file: '',
token: '',
cacheDir,
depth: 3,
filterParentNode: (nodes) => {
switch (nodes.length) {
case 1: {
const node = nodes[0];
return node?.name === 'icon';
}
case 2: {
const node = nodes[1];
return ['planet', 'c_planet', 'c_zodiac', 'zodiac', 'elements', 'basic', 'title'].includes(node?.name || 'NULL');
}
}
return false;
},
iconNameForNode: (node) => {
if (
node.parents.length !== 2 ||
(node.type !== 'FRAME' && node.type !== 'COMPONENT' && node.type !== 'INSTANCE')
) {
return null;
}
return node.name;
}
});
} catch (err) {
console.log('import from figma error: ', err);
}the err:

Metadata
Metadata
Assignees
Labels
No labels