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

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

Open ben-laird opened this issue 1 year ago • 3 comments

Duplicates

  • [X] I have searched the existing issues

Latest version

  • [X] I have tested the 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:

  • #1177, specifically this comment where a contributor points out that Deno is affected by a similar problem
  • this issue in Deno that the contributor mentioned

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

ben-laird avatar Jun 07 '24 02:06 ben-laird

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?

Brendonovich avatar Jun 17 '24 05:06 Brendonovich

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

brenelz avatar Jun 18 '24 02:06 brenelz

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

vincentfretin avatar Jun 18 '24 07:06 vincentfretin

@ben-laird , run pnpm i (or other pm) and then DENO_FUTURE=1 deno task dev

birkskyum avatar Aug 06 '24 00:08 birkskyum

Running DENO_FUTURE=1 deno task dev works as expected. I'll close this issue as completed if you'd like @birkskyum, since this is an upstream issue that's fixed in a future version of Deno.

ben-laird avatar Aug 06 '24 02:08 ben-laird