Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with Vitest 3 #1068

Closed
benmccann opened this issue Jan 16, 2025 · 3 comments
Closed

Incompatible with Vitest 3 #1068

benmccann opened this issue Jan 16, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@benmccann
Copy link
Member

Describe the bug

Vitest seems to be using a frozen data structure for resolve conditions

Image

Reproduction URL

sveltejs/kit#13324

Reproduction

I noticed this in the renovate PR to SvelteKit for upgrading to Vitest 3

Logs

prerendering-test-basics@0.0.2-next.0 : test packages/kit/test/prerendering/basics
  
  > prerendering-test-basics@0.0.2-next.0 test /home/runner/work/kit/kit/packages/kit/test/prerendering/basics
  > vitest run
  
  Warning: G] Cannot find base config file "./.svelte-kit/tsconfig.json" [tsconfig.json]
  
      tsconfig.json:7:12:
        7 │   "extends": "./.svelte-kit/tsconfig.json"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  
  ⎯⎯⎯⎯⎯⎯⎯ Startup Error ⎯⎯⎯⎯⎯⎯⎯⎯
  TypeError: Cannot add property 3, object is not extensible
      at Array.push (<anonymous>)
      at configEnvironment (file:///home/runner/work/kit/kit/node_modules/.pnpm/@sveltejs+vite-plugin-svelte@5.0.1_svelte@5.2.9_vite@6.0.1_@types+node@18.19.50_lightningcss@1.24.1_/node_modules/@sveltejs/vite-plugin-svelte/src/index.js:76:31)
      at runConfigEnvironmentHook (file:///home/runner/work/kit/kit/node_modules/.pnpm/vite@6.0.1_@types+node@18.19.50_lightningcss@1.24.1/node_modules/vite/dist/node/chunks/dep-BcnkIxro.js:53615:27)
      at resolveConfig (file:///home/runner/work/kit/kit/node_modules/.pnpm/vite@6.0.1_@types+node@18.19.50_lightningcss@1.24.1/node_modules/vite/dist/node/chunks/dep-BcnkIxro.js:53048:9)
      at async _createServer (file:///home/runner/work/kit/kit/node_modules/.pnpm/vite@6.0.1_@types+node@18.19.50_lightningcss@1.24.1/node_modules/vite/dist/node/chunks/dep-BcnkIxro.js:43320:18)
      at async createViteServer (file:///home/runner/work/kit/kit/node_modules/.pnpm/vitest@3.0.0_@types+node@18.19.50_lightningcss@1.24.1/node_modules/vitest/dist/chunks/cli-api.CmJw5Cd_.js:9963:18)
      at async createVitest (file:///home/runner/work/kit/kit/node_modules/.pnpm/vitest@3.0.0_@types+node@18.19.50_lightningcss@1.24.1/node_modules/vitest/dist/chunks/cli-api.CmJw5Cd_.js:13145:18)
      at async prepareVitest (file:///home/runner/work/kit/kit/node_modules/.pnpm/vitest@3.0.0_@types+node@18.19.50_lightningcss@1.24.1/node_modules/vitest/dist/chunks/cli-api.CmJw5Cd_.js:13564:15)
      at async startVitest (file:///home/runner/work/kit/kit/node_modules/.pnpm/vitest@3.0.0_@types+node@18.19.50_lightningcss@1.24.1/node_modules/vitest/dist/chunks/cli-api.CmJw5Cd_.js:13495:15)
      at async start (file:///home/runner/work/kit/kit/node_modules/.pnpm/vitest@3.0.0_@types+node@18.19.50_lightningcss@1.24.1/node_modules/vitest/dist/chunks/cac.DZC9WjGM.js:1571:17)

System Info

vitest 3
@benmccann benmccann added bug Something isn't working triage Awaiting triage by a project member labels Jan 16, 2025
@dominikg
Copy link
Member

cc @sheremet-va

@dominikg dominikg removed the triage Awaiting triage by a project member label Jan 16, 2025
@dominikg
Copy link
Member

@dominikg
Copy link
Member

fixed in vitest@3.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants