How To solve RollUpError when using queryCollectionSearchSections server side? #3189
Unanswered
sayanichopra
asked this question in
Q&A
Replies: 1 comment
-
|
This usually happens when code imports an internal helper name from Nuxt Content's built output. Use the public helper that Nuxt auto-imports instead: // server/api/search.json.get.ts
export default defineEventHandler(async (event) => {
return await queryCollectionSearchSections(event, 'content')
})or, if auto-imports are not available in that file, import from Nuxt's generated imports rather than from import { queryCollectionSearchSections } from '#imports'I would avoid importing anything from |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
ERROR RollupError: server/api/search.json.get.ts (2:9): "queryCollectionSearchSectionsWithEvent" is not exported by "node_modules/@nuxt/content/dist/runtime/nitro.js", imported by "server/api/search.json.get.ts".
Beta Was this translation helpful? Give feedback.
All reactions