solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

Project just initialized doesn't work (Vitest + SSR + TypeScript)

Open Aex12 opened this issue 3 years ago • 2 comments

Steps to reproduce

Initialize a new project using npm init solid@next Select the following options: Vitest, SSR enabled, Typescript enabled. Install deps: npm install Run the dev server: npm run dev Open the browser on localhost:300.

The bug

The counter doesn't work. You can see

on the top of the page as a plain string, without rendering.

If you run the tests with npm run test, Vitest will complain with the following error: Failed to load $CWD/node_modules/solid-start/vitest.setup.ts.

Workaround

Starting a project with Bare + SSR + Typescript work as expected, but there is no testing library.

Aex12 avatar Aug 12 '22 17:08 Aex12

This is fixed now. Also is seems to be a duplicate of https://github.com/solidjs/solid-start/issues/24 Either way this issue can be closed.

orenelbaum avatar Dec 04 '22 06:12 orenelbaum

No, for SSR, you need to change the configuration so test.transformMode will detect the tests as SSR, see https://vitest.dev/config/#transformmode

atk avatar Dec 04 '22 08:12 atk