Open
Description
Describe the bug
It works in browser and Astro's npm run dev
.
I'm getting this error when trying to test with Vitest of Astro page with svelte file.
TypeError: Cannot read properties of undefined (reading 'call')
// edited - moved to Logs section
Reproduction
If required then later might try to repro. Its big page with runes, functions passed as props and template.
EDIT:
https://stackblitz.com/edit/github-ch9tapzs?file=test%2Fhappy-dom-env.test.ts&on=stackblitz
After dependencies install, stop npm in terminal and run npm run test
Logs
TypeError: Cannot read properties of undefined (reading 'call')
❯ get_first_child node_modules/svelte/src/internal/client/dom/operations.js:81:28
80| /**
81| * @template {Node} N
82| * @param {N} node
| ^
83| * @returns {Node | null}
84| */
❯ eval node_modules/svelte/src/internal/client/dom/template.js:48:91
❯ eval node_modules/svelte/src/internal/client/dev/elements.js:13:15
❯ Test src/components/test.svelte:15:12
❯ render node_modules/svelte/src/internal/server/index.js:121:2
❯ Object.renderToStaticMarkup node_modules/@astrojs/svelte/server.js:45:49
❯ renderFrameworkComponent node_modules/astro/dist/runtime/server/render/component.js:189:68
❯ renderComponent node_modules/astro/dist/runtime/server/render/component.js:368:10
System Info
System:
OS: Linux 5.15 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
CPU: (2) x64 Intel(R) Core(TM)2 Duo CPU E4500 @ 2.20GHz
Memory: 464.32 MB / 3.82 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
Yarn: 1.22.17 - /usr/local/bin/yarn
npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
pnpm: 9.15.2 - ~/.local/share/pnpm/pnpm
bun: 1.1.6 - ~/.bun/bin/bun
Watchman: 20201115.021953.0 - /usr/local/bin/watchman
Browsers:
Chrome: 132.0.6834.83
npmPackages:
svelte: ^5.1.3 => 5.16.2
Severity
blocking all usage of svelte
Metadata
Metadata
Assignees
Labels
No labels