Skip to content

Cannot read property 'forEach' of undefined #67

@AliAtefAli

Description

@AliAtefAli

I want to connect the client web page for socketIO and admin-UI.
But this error appeared.

image

When I use the code below.

const { createServer } = require("http");
const Server  = require("socket.io");
const { instrument } = require("@socket.io/admin-ui");

const httpServer = createServer();

const io = new Server(httpServer, {
  cors: {
    origin: ["https://admin.socket.io"],
    credentials: true
  }
});

instrument(io, {
  auth: false
});

httpServer.listen(3000);


Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions