nuxt-modules / sitemap

Powerfully flexible XML Sitemaps that integrate seamlessly, for Nuxt.
https://nuxtseo.com/sitemap
336 stars 31 forks source link

fix: `Module '"#imports"' has no exported member 'asSitemapUrl'` #355

Closed guy-confetti closed 1 month ago

guy-confetti commented 2 months ago

🐛 The bug

🛠ī¸ To reproduce

https://stackblitz.com/edit/github-qjnbzv?file=server%2Fapi%2Fsitemap.ts

🌈 Expected behavior

according to the docs, should be importable from #imports

ℹī¸ Additional context

No response

harlan-zw commented 2 months ago

Hi, thanks for the reproduction.

Can you try doing nuxi upgrade --clean it might be a cache / dependency conflict issue.

In terms of Stackblitz I think that's a bug on their end, for some reason the don't respect the tsconfig.json in the server directory.

felixgabler commented 2 months ago

Hi! I get the same issue, both locally and on production. nuxt upgrade --clean did not help, unfortunately.

harlan-zw commented 2 months ago

Please check you have a tsconfig.json in your server folder pointing to the nitro types

{
  "extends": "../.nuxt/tsconfig.server.json"
}