denoland / denoland/tutorial-with-vue
http proxy error
- Dominant language
- TypeScript
- Stars
- 7
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
When running the tutorial as `deno task dev` (or even `npm run dev`), the developer gets a dangerous looking error in the console:
```bash
7.21.00 [vite] http proxy error: /api/dinosaurs
AbortError: The request has been cancelled.
at abortRequest (ext:deno_fetch/23_request.js:619:7)
at InnerRequest.close (ext:deno_http/00_serve.ts:86:7)
at ext:deno_http/00_serve.ts:337:19
at __drainNextTickAndMacrotasks (ext:core/01_core.js:439:7) (x2)
```
What is worse, this comes every time you refresh the browser, so it makes the environment pretty much unusable if you care about errors and warnings (i.e. quality of your code):
The problem is described in following issues:
- https://github.com/denoland/deno/issues/28850 — "Deno cannot drive Vite and Deno.serve simultaneously"
- https://github.com/vitejs/vite/issues/21159 — "Proxy connections abort early on Deno runtime" (closed, punted to
Deno)
- https://github.com/denoland/deno/issues/28848 — "spammy AbortError since 2.2.6"
Suggested fix:
Add `unstable-no-legacy-abort` flag to `dev:vite` script:
```
{
"scripts": {
...
"dev:vite": "deno run -A --unstable-no-legacy-abort npm:vite",
...
},
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the project’s dev:vite script and reproduce the issue using deno task dev or npm run dev, then refresh the browser while watching the console. Done means the tutorial runs normally without the recurring Vite http proxy AbortError; verify the result with the suggested Deno runtime flag.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- deno, vite
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100