You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To create a minimal svelte kit app with only the vitest extra added.
When running vitest via npm run test, it exits with the warning:
close timed out after 10000ms
Tests closed successfully but something prevents Vite server from exiting
Additionally, I've tried adding the workers vitest integration and still receive the same warning.
Please provide any relevant error logs
Console logs of a minimal c3 install w/ sveltekit and vitest, showing the "something prevents Vite server from exiting" warning at the end.
erikt@m1miniether cftest % npm create cloudflare@latest my-svelte-app -- --framework=svelte --experimental
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
> npx
> create-cloudflare my-svelte-app --framework=svelte --experimental
────────────────────────────────────────────────────────────────────────────────
👋 Welcome to create-cloudflare v2.36.0!
🧡 Let's get started.
🧪 Running in experimental mode
📊 Cloudflare collects telemetry about your usage of Create-Cloudflare.
Learn more at: https://github.com/cloudflare/workers-sdk/blob/main/packages/create-cloudflare/telemetry.md
────────────────────────────────────────────────────────────────────────────────
╭ Create an application with Cloudflare Step 1 of 3
│
├ In which directory do you want to create your application?
│ dir ./my-svelte-app
│
├ What would you like to start with?
│ category Framework Starter
│
├ Which development framework do you want to use?
│ framework SvelteKit
│
├ Continue with SvelteKit via `npx [email protected] create my-svelte-app`
│
Need to install the following packages:
[email protected]
Ok to proceed? (y)
┌ Welcome to the Svelte CLI! (v0.6.10)
│
◇ Which template would you like?
│ SvelteKit minimal
│
◇ Add type checking with Typescript?
│ Yes, using Typescript syntax
│
◆ Project created
│
◇ What would you like to add to your project? (use arrow keys / space bar)
│ vitest
│
◇ Which package manager do you want to install dependencies with?
│ npm
│
◆ Successfully setup add-ons
│
◆ Successfully installed dependencies
│
◇ Project next steps ─────────────────────────────────────────────────────╮
│ │
│ 1: cd my-svelte-app │
│ 2: git init && git add -A && git commit -m "Initial commit" (optional) │
│ 3: npm run dev -- --open │
│ │
│ To close the dev server, hit Ctrl-C │
│ │
│ Stuck? Visit us at https://svelte.dev/chat │
│ │
├──────────────────────────────────────────────────────────────────────────╯
│
└ You're all set!
├ Copying template files
│ files copied to project directory
│
╰ Application created
╭ Configuring your application for Cloudflare Step 2 of 3
│
├ Installing wrangler A command line tool for building Cloudflare Workers
│ installed via `npm install wrangler --save-dev`
│
├ Installing @cloudflare/workers-types
│ installed via npm
│
├ Adding latest types to `tsconfig.json`
│ added @cloudflare/workers-types/2023-07-01
│
├ Retrieving current workerd compatibility date
│ compatibility date 2025-01-09
│
├ Adding the Cloudflare Pages adapter
│ installed @sveltejs/adapter-cloudflare
│
├ Changing adapter in svelte.config.js
│
├ Updating global type definitions in app.d.ts
│
├ Adding Wrangler files to the .gitignore file
│ updated .gitignore file
│
├ Updating `package.json` scripts
│ updated `package.json`
│
├ Do you want to use git for version control?
│ no git
│
╰ Application configured
╭ Deploy with Cloudflare Step 3 of 3
│
├ Do you want to deploy your application?
│ no deploy via `npm run deploy`
│
╰ Done
────────────────────────────────────────────────────────────
🎉 SUCCESS Application created successfully!
💻 Continue Developing
Change directories: cd my-svelte-app
Start dev server: npm run dev
Deploy: npm run deploy
📖 Explore Documentation
https://developers.cloudflare.com/workers
🐛 Report an Issue
https://github.com/cloudflare/workers-sdk/issues/new/choose
💬 Join our Community
https://discord.cloudflare.com
────────────────────────────────────────────────────────────
erikt@m1miniether cftest % ls
my-svelte-app
erikt@m1miniether cftest % cd my-svelte-app
erikt@m1miniether my-svelte-app % ls
README.md src vite.config.ts
node_modules static wrangler.toml
package-lock.json svelte.config.js
package.json tsconfig.json
erikt@m1miniether my-svelte-app % npm run test
> [email protected] test
> npm run test:unit -- --run
> [email protected] test:unit
> vitest --run
RUN v2.1.8 /Users/erikt/cftest/my-svelte-app
✓ src/demo.spec.ts (1)
✓ sum test (1)
✓ adds 1 + 2 to equal 3
Test Files 1 passed (1)
Tests 1 passed (1)
Start at 21:55:58
Duration 331ms (transform 16ms, setup 0ms, collect 14ms, tests 2ms, environment 0ms, prepare 56ms)
close timed out after 10000ms
Tests closed successfully but something prevents Vite server from exiting
You can try to identify the cause by enabling "hanging-process" reporter. See https://vitest.dev/config/#reporters
The text was updated successfully, but these errors were encountered:
bigmac44
changed the title
🐛 BUG: Default SvelteKit project with vitest using create-cloudflare results in "something prevents Vite server from exiting"
🐛 BUG: Running vitest from the C3 default SvelteKit project results in "something prevents Vite server from exiting"
Jan 12, 2025
Which Cloudflare product(s) does this pertain to?
C3 (npm create cloudflare)
What versions are you using?
3.99.0
What operating system and version are you using?
Mac Sequoia 15.2
Please provide a link to a minimal reproduction
No response
Describe the Bug
TLDR
Vitest tests should work without timeouts / warnings when following Cloudflare's sveltekit quickstart.
Following the instructions here:
https://developers.cloudflare.com/workers/frameworks/framework-guides/svelte/
To create a minimal svelte kit app with only the vitest extra added.
When running vitest via
npm run test
, it exits with the warning:Additionally, I've tried adding the workers vitest integration and still receive the same warning.
Please provide any relevant error logs
Console logs of a minimal c3 install w/ sveltekit and vitest, showing the "something prevents Vite server from exiting" warning at the end.
The text was updated successfully, but these errors were encountered: