RedMadRobot / figma-export

Command line utility to export colors, typography, icons and images from Figma to Xcode / Android Studio project
MIT License
726 stars 114 forks source link

Failed when export anything #56

Closed pavelko3lov closed 3 years ago

pavelko3lov commented 3 years ago

When I export I get this error. What I can do?

Using FigmaExport to export colors.

Error: keyNotFound(CodingKeys(stringValue: "fontExtensionDirectory", intValue: nil), Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "ios", intValue: nil), CodingKeys(stringValue: "typography", intValue: nil)], debugDescription: "No value associated with key CodingKeys(stringValue: \"fontExtensionDirectory\", intValue: nil) (\"fontExtensionDirectory\").", underlyingError: nil))

It is in your Example iOS Demo Project.

subdan commented 3 years ago

Which version of FigmaExport do you use? figma-export --version

subdan commented 3 years ago

I've removed fontExtensionDirectory property in 0.12.0 version. Please update FigmaExport to the latest version.

pavelko3lov commented 3 years ago

Thanks, I've updated figma-export to 0.18.5 and now have slightly another error:

Error: keyNotFound(CodingKeys(stringValue: "xcodeprojPath", intValue: nil), Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "ios", intValue: nil)], debugDescription: "No value associated with key CodingKeys(stringValue: \"xcodeprojPath\", intValue: nil) (\"xcodeprojPath\").", underlyingError: nil))

appreciate for any help.

subdan commented 3 years ago

I added xcodeprojPath parameter to FigmaExport since 0.13.0. Read documentation for actual config.

pavelko3lov commented 3 years ago

Okay) thanks

Now:

2020-12-18T21:13:26+0300 info com.redmadrobot.figma-export : Using FigmaExport to export colors. 2020-12-18T21:13:26+0300 info com.redmadrobot.figma-export : Fetching colors. Please wait...

Error: keyNotFound(CodingKeys(stringValue: "color", intValue: nil), Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "nodes", intValue: nil), _JSONKey(stringValue: "739:0", intValue: nil), CodingKeys(stringValue: "document", intValue: nil), CodingKeys(stringValue: "fills", intValue: nil), _JSONKey(stringValue: "Index 0", intValue: 0)], debugDescription: "No value associated with key CodingKeys(stringValue: \"color\", intValue: nil) (\"color\").", underlyingError: nil))

Where I can find documentation about this part ?

subdan commented 3 years ago

The error says that you have incorrect Figma's Color Style. Read Design requirements.

Did you publish color styles to the team library?

image

All the Color Styles in your FIgma file should consist of only solid colors. There shouldn't be gradients or bitmap fills.

Could you please give me an access to your Figma file so I can check it?

pavelko3lov commented 3 years ago

Thanks, I'm ready to close the issue. But we cannot export images:

2020-12-21T15:00:17+0300 info com.redmadrobot.figma-export : Using FigmaExport to export images to Xcode project. 2020-12-21T15:00:17+0300 info com.redmadrobot.figma-export : Fetching images info from Figma. Please wait... Error: Components not found in the Figma file. Have you published Components to the Library?

In Figma we have Images in separate Page. Could this be the reason. ?

subdan commented 3 years ago

What is your Figma plan? Free, Professional or Organization? FigmaExport uses Shareable team libraries which available only for Professional and Organization plan.

pavelko3lov commented 3 years ago

It's Professional.

subdan commented 3 years ago

Ensure that you have published all the images to your team library.

Open Team Library:

Screen Shot 2020-12-21 at 15 12 04

Choose your Library:

Screen Shot 2020-12-21 at 15 12 27

Ensure that the Library contains all the images:

image
pavelko3lov commented 3 years ago

Ok, Thank you. We will try to move images to the same page as icons.