Skip to content

[Content]: useSession example in session.mdx breaks with SolidStart v2 default setupΒ #1469

Description

@tknkaa

πŸ“š Subject area/topic

SolidStart / Session

πŸ“‹ Page(s) affected (or suggested, for new content)

https://docs.solidjs.com/solid-start/advanced/session

πŸ“‹ Description of content that is out-of-date or incorrect

The session.mdx example imports useSession from vinxi/http:

import { useSession } from "vinxi/http";

This causes a runtime error in SolidStart v2 default setup (created via CLI):

TypeError: Cannot read properties of undefined (reading 'config')
at vinxi/runtime/http.js:209

Root cause: vinxi/http reads globalThis.app.config, which is undefined
in the SolidStart v2 + Nitro v2 runtime.

Fix: use @solidjs/start/http instead:

import { useSession } from "@solidjs/start/http";

πŸ–₯️ Reproduction in StackBlitz (if reporting incorrect content or code samples)

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions