Can't get started with @discordjs/core

Decided to mess around with /core today to see if it might be useful for a small lightweight project I'm planning.

Following the example on GitHub gets me nowhere and just presents an error I don't fully understand.

Type 'import("/Users/<no>/Documents/GitHub/djs-core/node_modules/@discordjs/ws/dist/index").WebSocketManager' is not assignable to type 'import("/Users/<no>/Documents/GitHub/djs-core/node_modules/@discordjs/core/node_modules/@discordjs/ws/dist/index").WebSocketManager'.
  Types of property 'options' are incompatible.
    Type 'import("/Users/<no>/Documents/GitHub/djs-core/node_modules/@discordjs/ws/dist/index").WebSocketManagerOptions' is not assignable to type 'import("/Users/<no>/Documents/GitHub/djs-core/node_modules/@discordjs/core/node_modules/@discordjs/ws/dist/index").WebSocketManagerOptions'.
      Type 'WebSocketManagerOptions' is not assignable to type 'OptionalWebSocketManagerOptions'.
        Types of property 'buildStrategy' are incompatible.
          Type '(manager: import("/Users/<no>/Documents/GitHub/djs-core/node_modules/@discordjs/ws/dist/index").WebSocketManager) => import("/Users/<no>/Documents/GitHub/djs-core/node_modules/@discordjs/ws/dist/index").IShardingStrategy' is not assignable to type '(manager: import("/Users/<no>/Documents/GitHub/djs-core/node_modules/@discordjs/core/node_modules/@discordjs/ws/dist/index").WebSocketManager) => import("/Users/<no>/Documents/GitHub/djs-core/node_modules/@discordjs/core/node_modules/@discordjs/ws/dist/index").IShardingStrategy'.
            Types of parameters 'manager' and 'manager' are incompatible.
              Type 'import("/Users/<no>/Documents/GitHub/djs-core/node_modules/@discordjs/core/node_modules/@discordjs/ws/dist/index").WebSocketManager' is not assignable to type 'import("/Users/<no>/Documents/GitHub/djs-core/node_modules/@discordjs/ws/dist/index").WebSocketManager'.
                Types of property 'options' are incompatible.
                  Type 'import("/Users/<no>/Documents/GitHub/djs-core/node_modules/@discordjs/core/node_modules/@discordjs/ws/dist/index").WebSocketManagerOptions' is not assignable to type 'import("/Users/<no>/Documents/GitHub/djs-core/node_modules/@discordjs/ws/dist/index").WebSocketManagerOptions'.
                    Type 'WebSocketManagerOptions' is not assignable to type 'OptionalWebSocketManagerOptions'.
                      Types of property 'buildStrategy' are incompatible.
                        Type '(manager: import("/Users/<no>/Documents/GitHub/djs-core/node_modules/@discordjs/core/node_modules/@discordjs/ws/dist/index").WebSocketManager) => import("/Users/<no>/Documents/GitHub/djs-core/node_modules/@discordjs/core/node_modules/@discordjs/ws/dist/index").IShardingStrategy' is not assignable to type '(manager: import("/Users/<no>/Documents/GitHub/djs-core/node_modules/@discordjs/ws/dist/index").WebSocketManager) => import("/Users/<no>/Documents/GitHub/djs-core/node_modules/@discordjs/ws/dist/index").IShardingStrategy'.
                          Types of parameters 'manager' and 'manager' are incompatible.
                            Type 'import("/Users/<no>/Documents/GitHub/djs-core/node_modules/@discordjs/ws/dist/index").WebSocketManager' is not assignable to type 'import("/Users/<no>/Documents/GitHub/djs-core/node_modules/@discordjs/core/node_modules/@discordjs/ws/dist/index").WebSocketManager'.
                              Types have separate declarations of a private property 'gatewayInformation'.


This is using the example provided here: https://github.com/discordjs/discord.js/tree/main/packages/core
The only alteration I have made is actually defining the token.
Was this page helpful?