nuxt-modules / nuxt-modules/strapi
How to use "useStrapi4" from /server/api?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 717
- Forks
- 89
- Avg merge
- 7h 3m
- Merged PRs (30d)
- 6
Description
How can you use Strapi from /server/api/name.post.js?
I get the error [nuxt] [request error] useStrapi4 is not defined if i do not import strapi, and if i try to import useStrapi4 from @nuxtjs/strapi I get the following error [worker reload] [worker init] The requested module 'file://C:/Users/...../node_modules/@nuxtjs/strapi/dist/module.mjs' does not provide an export named 'useStrapi4'.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with /server/api/name.post.js and the @nuxtjs/strapi module export referenced by the error. Check how useStrapi4 is expected to be accessed from a server API entry point, then document the supported usage and verify it no longer produces the reported import error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxtjs
- Domain
- api, backend
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100