zeplin / cli-connect-react-plugin

Zeplin CLI plugin for React components
MIT License
14 stars 6 forks source link

Error in connect command #18

Closed airamrguez closed 4 years ago

airamrguez commented 4 years ago

I'm getting this error when executing zeplin connect. It was working until I upgraded node version to v14.2.0. Don't know if it's related though.

/.config/yarn/global/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
yuqu commented 4 years ago

Hey Airam,

I could not reproduce any issues with the plugin using node v14.2.0.

The error will be gone after https://github.com/zeplin/cli-connect-react-plugin/pull/17 is merged. However, the actualy root cause is that react-docgen could not read type, tsType or flowType of any of your components, so one of your component fields may not be shown in the resulting code snippet.

I can help you if you could share a sample code, feel free to open the issue again if the PR does not work for you.