solidjs / solid-start

SolidStart, the Solid app framework
https://start.solidjs.com
MIT License
4.93k stars 371 forks source link

[Bug?]: Deno downloading error - npm package 'uWebSockets.js' does not exist #1530

Open ben-laird opened 3 weeks ago

ben-laird commented 3 weeks ago

Duplicates

Latest version

Current behavior 😯

When using the basic Solid Start template with Typescript, running deno task dev will error with the following message:

error: npm package 'uWebSockets.js' does not exist.

Expected behavior πŸ€”

Deno should be able to download all dependencies listed in package.json and should start the development server

Steps to reproduce πŸ•Ή

Steps:

  1. run pnpm create solid and use any name
  2. select "Yes" when prompted for whether this is a Solid Start project
  3. select the "basic" template
  4. select "Yes" when prompted for whether to use TypeScript
  5. run deno task dev in the root directory of the new project
  6. observe error

Context πŸ”¦

I'm playing around with Solid Start in personal web apps and wanted to know if it would work with Deno in development and not just in production. I can't assume it does even though Vite works with Deno because framework authors can still break that compatibility; I've found that to be the case with Astro, regrettably.

Potentially related issues:

There's a chance this bug is upstream, possibly with Vinxi, Nitro, or even with Deno. I just figured I'd start here since I can't exactly pinpoint where the bug actually happens; there's no stack trace or indication of what caused uWebSockets.js to even be included in the downloads.

package.json:

{
  "name": "example-basic",
  "type": "module",
  "scripts": {
    "dev": "vinxi dev",
    "build": "vinxi build",
    "start": "vinxi start",
    "version": "vinxi version"
  },
  "dependencies": {
    "@solidjs/meta": "^0.29.4",
    "@solidjs/router": "^0.13.3",
    "@solidjs/start": "^1.0.1",
    "solid-js": "^1.8.17",
    "vinxi": "^0.3.11"
  },
  "engines": {
    "node": ">=18"
  }
}

Your environment 🌎

$ system_profiler SPSoftwareDataType SPHardwareDataType: (partial)
Software:

    System Software Overview:

      System Version: macOS 14.3 (23D56)
      Kernel Version: Darwin 23.3.0

Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Chip: Apple M3 Max
      Total Number of Cores: 14 (10 performance and 4 efficiency)
      Memory: 36 GB
      System Firmware Version: 10151.81.1

$ deno --version:
deno 1.44.0 (release, aarch64-apple-darwin)
v8 12.6.228.3
typescript 5.4.5

$ node --version:
v22.2.0

$ pnpm --version:
9.1.4
Brendonovich commented 1 week ago

uWebSockets.js is included by crossws. You can replicate this error outside of start by running deno repl and entering import "npm:crossws". Maybe Deno's npm: resolver doesn't take into account packages that have github: dependencies, since it seems to look for uWebSockets.js on npm?

brenelz commented 1 week ago

yeah good call @Brendonovich. Maybe need to file a bug on the deno repo?

vincentfretin commented 1 week ago

https://github.com/denoland/deno/issues/20339#issuecomment-1967957257 -> https://github.com/denoland/deno/issues/22606#issuecomment-2134637706