Could not generate snippet
DNCGraef opened this issue · 1 comments
DNCGraef commented
Hi,
I am getting this error after following the setup guide and running "zeplin connect":
Connecting components to Zeplin components failed.
Error occurred while processing MyApp/Views/Buttons/ActionButton.swift with @zeplin/cli-connect-swift-plugin:
Could not generate snippet on MyApp/Views/Buttons/ActionButton.swift
The logs look like this:
2020-02-28 14:28:43 - info - Zeplin CLI - v1.0.0
2020-02-28 14:28:43 - debug - connect options: {"configFiles":[".zeplin/components.json"],"devMode":false,"devModePort":9756,"devModeWatch":true,"plugins":[]}
2020-02-28 14:28:43 - debug - .zeplin/components.json content: {"plugins":[{"name":"@zeplin/cli-connect-swift-plugin"}],"projects":[],"styleguides":["5dadc5dbe0e5042c2d1974d5"],"components":[{"path”:”MyApp/Views/Buttons/ActionButton.swift","zeplinNames":["Controls / Button / Primary"]}]}
2020-02-28 14:28:43 - debug - component config files: [{"plugins":[{"name":"@zeplin/cli-connect-swift-plugin"}],"projects":[],"styleguides":["5dadc5dbe0e5042c2d1974d5"],"components":[{"path”:”MyApp/Views/Buttons/ActionButton.swift","zeplinNames":["Controls / Button / Primary"]}]}]
2020-02-28 14:28:43 - debug - Initializing @zeplin/cli-connect-swift-plugin.
2020-02-28 14:28:43 - debug - @zeplin/cli-connect-swift-plugin supports MyApp/Views/Buttons/ActionButton.swift. Processing…
2020-02-28 14:28:43 - error - Connecting components to Zeplin components failed. Error occurred while processing MyApp/Views/Buttons/ActionButton.swift with @zeplin/cli-connect-swift-plugin: Could not generate snippet on MyApp/Views/Buttons/ActionButton.swift
2020-02-28 14:28:43 - debug - Error: Connecting components to Zeplin components failed. Error occurred while processing MyApp/Views/Buttons/ActionButton.swift with @zeplin/cli-connect-swift-plugin: Could not generate snippet on MyApp/Views/Buttons/ActionButton.swift at /usr/local/lib/node_modules/@zeplin/cli/dist/src/commands/connect/plugin.js:137:19 at Generator.throw (<anonymous>) at rejected (/usr/local/lib/node_modules/@zeplin/cli/dist/src/commands/connect/plugin.js:6:65) at processTicksAndRejections (internal/process/task_queues.js:85:5)
2020-02-28 14:28:43 - debug - "Error: Command failed: sourcekitten structure --file \”MyApp/Views/Buttons/ActionButton.swift\"\nFatal error: Loading sourcekitd.framework/Versions/A/sourcekitd failed: file /private/tmp/sourcekitten-20200116-76916-rox7z0/Source/SourceKittenFramework/library_wrapper.swift, line 39\n\n at ChildProcess.exithandler (child_process.js:295:12)\n at ChildProcess.emit (events.js:203:13)\n at maybeClose (internal/child_process.js:1021:16)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)"
2020-02-28 14:28:43 - info - Please check ~/.zeplin/cli.log for details.
It's not clear to me what the issue is - any ideas? I'm on MacOS Catalina 10.15.3.
yuqu commented
Hi @DNCGraef ,
It seems sourcekitten could not find some Swift resources. I assume that you have XCode installed but your command line might not be pointing to it.
You can check where it points using the following command:
sudo xcode-select -p
If that's not pointing toward XCode installation then you should execute the following command (with the last parameter pointing to your XCode installation) and try it again?
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Let me know if it helps.