cloudflare / cloudflare/chanfana

CF worker with SPA and Chanfana not working

Open
#285 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
766
Forks
70
Avg merge
25m
Merged PRs (30d)
4

Description

I'm trying SPA with CF worker which has vite-plugin integrated. However, when I'm trying to request an api through wrangler server / vite server I'm getting the following error:

✘ [ERROR] TypeError: Class constructor Test cannot be invoked without 'new'

Also the docs_url, openapi_url and redoc_url were not working.

Contributor guide

Open the contributing guide

Research direction

No files or tests are named. Start by reproducing the failure in the SPA and Cloudflare Worker setup using the vite-plugin and wrangler server, then trace the API request and generated docs URLs. Done means API requests work and docs_url, openapi_url, and redoc_url resolve correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vite
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.