Static GitHub Issues

[2691] Generating dynamic routes Error: "generate.routes" must be an array

prev: why customize bundle filename occur error in nuxt dev mode?
next: Proposal: Allow fallback to SPA in universal mode's generate

I'm using Nuxtent content module. I'm following the directions on the docs page replaced the URL with local content-api generated by Nuxtent.

When I run generate command I get the following Error: "generate.routes" must be an array

const axios = require('axios')

module.exports = {
  generate: {
    routes: function () {
      return axios.get('https://my-api/users')
      .then((res) => {
        return res.data.map((user) => {
          return '/users/' + user.id
        })
      })
    }
  }}
<!--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/c2339">#c2339</a>)</em></sub></div>