react-docgen
react-docgen copied to clipboard
React/TypeScript - Connecting components to Zeplin components failed.
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",
I am also having the same issue.
- @zeplin/[email protected]
- @zeplin/[email protected]
- @zeplin/[email protected]
Have you guys found any way out of this? Or what exactly is causing the issue?
@jacobdo2 not yet sadly. Wish we could prioritise this ticket.
This may have been resolved today in @zeplin/[email protected]