nuxt icon indicating copy to clipboard operation
nuxt copied to clipboard

the websocket's `peer.peers` is `undefined` on deno-deploy

Open dongwa opened this issue 1 year ago • 4 comments

Environment

nuxt + deno-deploy

Reproduction

repo: https://github.com/dongwa/nuxt_minirepo

deno-deploy: https://donglin-nuxt-minire-46.deno.dev/websocket

Describe the bug

The bug only occurs in the Deno Deploy environment and not in the development environment.

peer.peers works well in the development environment, but it is undefined in the Deno Deploy environment.

Image Image

Additional context

No response

Logs

No response

dongwa avatar Oct 08 '24 08:10 dongwa

Can you please report it upstream in crossws 🙏🏼

PS: Please try nuxt nightly channel as it includes latest crossws 0.3

pi0 avatar Oct 08 '24 08:10 pi0

Can you please report it upstream in crossws 🙏🏼

PS: Please try nuxt nightly channel as it includes latest crossws 0.3

I am trying nuxt-nightly,but how to deal with this?:

Module @primevue/nuxt-module is disabled due to incompatibility issues:                                                                                   18:50:46
 - [nuxt] Nuxt version ^3.0.0 is required but currently using 4.0.0-28806290.e3caf0ff

Image

dongwa avatar Oct 08 '24 10:10 dongwa

Ah! There is a 3.x tag on npm i believe.

Alternatively you can try Nitro nightly only it should be compatible. https://nitro.unjs.io/guide/nightly

pi0 avatar Oct 08 '24 11:10 pi0

I found out that peer.peers is a new feature of crossws 0.3. I have resolved it with the following solution:

  "overrides": {
    "crossws": "^0.3.1"
  },
  "pnpm": {
    "overrides": {
      "crossws": "^0.3.1"
    }
  }

dongwa avatar Oct 09 '24 01:10 dongwa