steps:
pnpm i
pnpm build && pnpm preview
# visit preview site
this causes a 500 response with
TypeError: Cannot set properties of null (setting 'c')
at render (<root>/sveltekit-inlineconst-repro/.svelte-kit/output/server/chunks/server.js:1538:11)
at Function._render [as render] (<root>/sveltekit-inlineconst-repro/.svelte-kit/output/server/chunks/internal.js:13:18)
at <root>/sveltekit-inlineconst-repro/.svelte-kit/output/server/index.js:1297:28
at AsyncLocalStorage.run (node:internal/async_local_storage/async_hooks:91:14)
at with_request_store (<root>/sveltekit-inlineconst-repro/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_4d0a05a9f3e621d0509fc33c52b3772d/node_modules/@sveltejs/kit/src/exports/internal/event.js:65:20)
at render_response (<root>/sveltekit-inlineconst-repro/.svelte-kit/output/server/index.js:1294:15)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async respond_with_error (<root>/sveltekit-inlineconst-repro/.svelte-kit/output/server/index.js:1664:10)
at async resolve$1 (<root>/sveltekit-inlineconst-repro/.svelte-kit/output/server/index.js:3013:34)
at async fn (<root>/sveltekit-inlineconst-repro/.svelte-kit/output/server/index.js:2881:12)
the code error happens at this code
if (options.context) {
push();
null.c = options.context;
}
Notice the null.c
. Which i believe is inlined from here https://github.com/sveltejs/svelte/blob/61f75651d6a4f1106a55c2cd357751d473729e55/packages/svelte/src/internal/server/context.js#L7