React/TypeScript - Connecting components to Zeplin components failed.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- react, typescript
- Domain
- documentation, tooling
Research direction
Start by reproducing the connection failure with src/components/atoms/Button/Button.tsx, the shown config, and the listed @zeplin CLI package versions. Read the plugin’s dist/template/base.pug around line 18 and inspect the component metadata reaching it; done means the Zeplin connection completes without the undefined propType error.
Written by the indexing model from the issue text.
Description
Seems like I am having issues with ES6 imports, or TypeScript itself?
import React from "react";
import cls from "classnames";
import { IButtonProps } from "./types";
import "./Button.scss";
const baseclass = "button";
const Button = ({
...,
}: IButtonProps) => {
const classes = cls(
baseclass,
className,
...,
);
return (
<button
disabled={disabled}
className={classes}
type={type}
onClick={onClick}>
{children}
</button>
);
};
export default Button;
Results in following output issue:
Connecting components to Zeplin components failed.
Error occurred while processing src/components/atoms/Button/Button.tsx with @zeplin/cli-connect-react-plugin:
/Users/carlbowen/WebstormProjects/note/node_modules/@zeplin/cli-connect-react-plugin/dist/template/base.pug:18
16|
17| mixin propType(name, propType)
> 18| if propType.name === "union"
19| | #{name}={union[
20| +propertyValues(propType.value)
21| | }]
Cannot read property 'name' of undefined
My config file is as follows:
{
"plugins": [
{
"name": "@zeplin/cli-connect-react-plugin"
}
],
"projects": [],
"styleguides": [
"5cd486b18a..."
],
"components": [
{
"path": "src/components/atoms/Button/Button.tsx",
"zeplinNames": [
"Full Logo"
]
}
]
}
API versions in use:
"@zeplin/cli": "^1.0.0",
"@zeplin/cli-connect-react-plugin": "^0.2.3",
- Dominant language
- TypeScript
- Stars
- 3.8k
- Forks
- 316
- Avg merge
- 3h 28m
- Merged PRs (30d)
- 6
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from reactjs/react-docgen
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
reactjs/react-docgen#1102 ·
-
Typescript Status Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
reactjs/react-docgen#1005 · 4 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
reactjs/react-docgen#997 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
reactjs/react-docgen#994 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
reactjs/react-docgen#982 · 2 comments ·
All issues in reactjs/react-docgen
Similar issues
-
Browser Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
getsentry/sentry-javascript#24577 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agilepathway/label-checker#640 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
agentic-workflows
Difficulty 1/5 Under an hour Newbie friendliness 85/100
githubnext/rig#534 ·
-
automation missing-model model-sync provider:pioneer
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anomalyco/models.dev#7701 ·