Static GitHub Issues

[1625] Cannot read property 'data' of undefined

prev: Error when running npm run build
next: Website not working while 'npm run build'

i try to visiting profile route from nuxt-link

<nuxt-link class="nav-item-child nav-item-hover" :to="{name:'profile-id', params:{id: $store.state.auth.user.id}}">
                                    Profile
                                </nuxt-link>

but i get an error in my browser image.

this is my asyncData method, $store.action & my folder structure image

image

image

the error just happened when i click the link from nuxt-link & use this syntax context.$router.push({name: 'profile-id', params: {id: data.user.id}}); but when i do click right and open link in a new tab, the error is gone...

can anyone solve this :( , sorry for bad english

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1451">#c1451</a>)</em></sub></div>