Static GitHub Issues

[2071] SSR error when Writing API in Nuxt with Router Module?

prev: Upgrade ws to version 3.3.1 or higher.
next: how to customizing variables bootstrap4

I use Nuxt with Router Module Currently, i write api like this:

<template>
  <div class="row flex">
    {{posts.id}}
  </div>
</template>
<script>
  import axios from 'axios'
  import Item from '~/components/feeds/Post.vue'
  export default {
    async asyncData ({ store, route }) {
      let { data } = await axios.get('http://localhost:8000/api/v1/feeds/' + route.params.id + '/')
      return {
        posts: data
      }
    },
    components: {
      'post-detail': Item
    }
  }
</script>

I get this error: image How can I fixed this. @Atinux Please help my with your Router Module package.

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