Skip to content

[Bug?]: Client-only API called on the server side when using deno.json #1990

@khwalkowicz

Description

@khwalkowicz

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

When using deno.json in place of package.json & tsconfig.json
app throws

[vite] (ssr) Error when evaluating SSR module $vinxi/handler/ssr: Client-only API called on the server side. Run client-only code in onMount, or conditionally run client-only component with <Show>.
      at notSup (/solidstart-deno-bug-repro/node_modules/.deno/[email protected]/node_modules/solid-js/web/dist/server.js:755:9)
      at /solidstart-deno-bug-repro/node_modules/.deno/@[email protected]/node_modules/@solidjs/router/dist/index.js:1637:27

Expected behavior 🤔

No errors should be thrown when deno.json is a 1:1 representation of package.json & tsconfig.json

Steps to reproduce 🕹

Steps:

  1. Run deno init --npm solid@latest and select any of the templates
  2. Create a deno.json with import map representing 1:1 dependencies from package.json & compilerOptions copied over from tsconfig.json
  3. Run deno install
  4. Run deno task dev

Can also use my minimal repro repo here (using the basic template):
https://github.com/khwalkowicz/solidstart-deno-bug-repro

Context 🔦

Considering deno runtime is supported with Solid & install instructions are in the docs I would expect all of deno's toolkit to be supported
I wanted to use deno linter & formatter & didn't want to keep both package.json and deno.json

Your environment 🌎

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions