Skip to content
This repository was archived by the owner on May 26, 2025. It is now read-only.
This repository was archived by the owner on May 26, 2025. It is now read-only.

run next dev found some error #4

@zackshen

Description

@zackshen

hi sam3d,

nice job! the way use websocket is very clean and easy. today i tried this plugin , but found a error in the output log.

this.ensureApiPage is not a function!

can you give a full example ? thank u

env

{
  "name": "ws-demo",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start"
  },
  "dependencies": {
    "next": "13.2.4",
    "next-plugin-websocket": "^0.1.2",
    "react": "18.2.0",
    "react-dom": "18.2.0"
  }
}

node = 16.13.2

next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
ready - loaded websocket plugin successfully
event - compiled client and server successfully in 612 ms (168 modules)
wait - compiling /_error (client and server)...
event - compiled client and server successfully in 146 ms (169 modules)
warn - Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
wait - compiling / (client and server)...
event - compiled client and server successfully in 206 ms (213 modules)
error - unhandledRejection: TypeError: this.ensureApiPage is not a function

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions