drupal-graphql / drupal-decoupled-app

Decoupled Drupal demo application based on React, GraphQL and Apollo including server-side rendering.
MIT License
311 stars 76 forks source link

TypeError: Cannot read property 'asPath' of undefined #415

Open swr82 opened 6 years ago

swr82 commented 6 years ago

Hi, yarn build fails with this error... Any ideas how to fix it?

/src/components/Router/index.tsx ` const withQuery = graphql< IRouterQueryProps, IRouterQueryData, IRouterQueryVariables, IRouterQueryChildProps

(query, { options: props => ({ variables: { path: props.url.asPath, }, }), props: ({ ownProps, data }) => ({ ...ownProps, entity: data.route && data.route.entity, loading: data.loading, }), }); `

signalwerk commented 6 years ago

I had the same. To make it work for the moment i renamed components/router/index.tsx to components/router/index.jsx to disable the type check.