-
Notifications
You must be signed in to change notification settings - Fork 12
Having Trouble With Dynamic Import #14
Comments
Hi SleepiestAdam Not sure what the actual error is that you are getting and if this will help, but I did find that if I use the spread operator when returning the array it resolved the following error: e.g
This fixed the problem when using a function to populated the 'routes' value for the sitemap
But when I also use the function under
I for some or other reason get the following error: at node_modules/@funken-studio/sitemap-nuxt-3/dist/module.mjs:418:24 |
I was also getting the same error in RC.14: "undefined is not iterable (cannot read property Symbol(Symbol.iterator))" This is killing me. edit: It seems to be giving an error at this line: "/node_modules/@funken-studio/sitemap-nuxt-3/dist/runtime/cache.mjs:11:40" at the async AsyncCache.load. ** SOLVED ** eg. export default async () => { |
Anyone used supabase? |
I'm using Nuxt 3 release candidate 13 and just installed sitemap-module-nuxt-3 today.
I'm trying to make a call to our REST api that just returns a standard array of strings / dynamic routes.
My dynamicRoutes.js file is exactly as the example:
My sitemap_routes file imports my back-end functions, one of which is getRoutes, which simply calls the RestAPI and returns the array of strings.
Unfortunately it seems whenever I try use backendServices in my sitemap_routes.js file, it fails to load the routes.
If I change my sitemap_routes to something like this:
Then it works fine...
The backendServices function "getRoutes" is working fine in other parts of the app, and I've confirmed it's correctly returning an array of routes, so I'm a little stumped as to why it fails to work when I make it async and try have it fetch the routes from the REST api.
The text was updated successfully, but these errors were encountered: