Figma Code Connect doesn't work.

オープン
#311 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
figma, html, typescript

調査の方向性

Start by tracing how figma connect publish discovers files from figma.config.json, then inspect the HTML template parser path that handles placeholders in Code Connect mappings. Reproduce the reported monorepo glob and conditional-expression error against the supplied mapping; done means confirming the cause and documenting or fixing discovery and parser behavior for this Vue/HTML setup.

索引モデルが issue の本文から書いたものです。

説明

API question

Title: Code Connect (Vue/HTML, monorepo) — “No Code Connect files found” + template ParserError

CLI: figma -V → 1.3.5
OS: Windows 11 Home Single Language — 10.0.26100 (Build 26100)

Project: Vue 3 (HTML parser), monorepo (packages/**/src/**)

Config (repo root figma.config.json):

{
  "codeConnect": {
    "parser": "html",
    "include": ["packages/**/src/**/*.figma.ts"],
    "exclude": ["**/dist/**", "**/node_modules/**"],
    "label": "Vue 3"
  }
}

Mapping file path:
packages/components/src/figma/default-button.figma.ts

Figma node URL (main component):
https://www.figma.com/design/E1fhIWXU1sQRP4ZItKgQu4/GDS-v3.16.1-----Zeta-Hacks-?node-id=27-5765

Mapping (minimal repro):

import figma, { html, text } from '@figma/code-connect/html';

figma.connect("https://www.figma.com/design/E1fhIWXU1sQRP4ZItKgQu4/GDS-v3.16.1-----Zeta-Hacks-?node-id=27-5765", {
  props: {
    text: figma.string("Text"),
    leftIconInstance: figma.instance("Left Icon instance"),
    rightIconInstance: figma.instance("Right Icon instance"),
    iconOnlyInstance: figma.instance("Icon only instance"),
  },
  example: (p) => html`<gds-button>${text(p.text)}</gds-button>`,
  imports: ["import { GdsButton } from '@your-scope/button'"]
});

Steps (CMD):

  1. cd "C:\Users\mayan\OneDrive\Desktop\Figma Code\galaxy-design-system-main"
  2. set FIGMA_ACCESS_TOKEN=figd_xxxxxxxxxxxxxxxxx
  3. npx figma connect publish
    (Also tried: npx figma connect create "<node-url>" then publish.)

Actual result:

  • Often: “No Code Connect files found …” (even with file present & glob above).
  • When using conditionals inside html\...`: **ParserError** — *Expected a call expression as a placeholder in the template, got ConditionalExpression*. Replaced with text(...)` calls to avoid conditionals.

Questions:

  1. Are ?:/&& conditionals unsupported inside ${ ... } for HTML templates?
  2. For HTML/Vue projects, should we avoid the interactive wizard and use only create/manual files?
  3. Is my monorepo include glob correct, or is there a better recommended pattern?

Thanks!

主要言語
TypeScript
スター
1.6k
フォーク
126
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

figma/code-connect のほかの issue

figma/code-connect の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。