nuxt-modules / nuxt-modules/strapi

It works fine on the web, but I can't get it on the server

Open
#320 7 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
TypeScript
Stars
717
Forks
89
Avg merge
7h 3m
Merged PRs (30d)
6

Description

It works fine on the web, but I can't get it on the server

server/colors/[id].ts
export default defineEventHandler(async (event)=>{ const { find } = useStrapi4() return ''; })

500 useStrapi4 is not defined

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with server/colors/[id].ts and reproduce the server request that reports “useStrapi4 is not defined.” Compare how useStrapi4 is made available on the web with its availability in this server entry point. Done means the server route no longer fails with that error.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxt, typescript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.