Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
swr82 opened this issue Sep 4, 2018 · 1 comment
Open

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

swr82 opened this issue Sep 4, 2018 · 1 comment

Comments

@swr82
Copy link

swr82 commented Sep 4, 2018

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants