#Typings build errors node_modules/discord.js/typings/index.d.ts

5 messages · Page 1 of 1 (latest)

ivory grotto
#

node -v v20.3.1
"discord.js": "^14.12.1"
"typescript": "^4.9.5"
skipLibCheck:true
strict:true

Unable to figure out a build issue that has just started occuring. Definetly missing something obvious.

Have attempted clearing package lock and node modules and reinstalling all dependencies after I started encountering build errors out the blue on npm run build in the typings.index.ts file (97 total) examples:

node_modules/discord.js/typings/index.d.ts:1175:21 - error TS1139: Type parameter declaration expected.

1175   public getChannel<const T extends ChannelType = ChannelType>(
                         ~~~~~

node_modules/discord.js/typings/index.d.ts:1175:27 - error TS1434: Unexpected keyword or identifier.

1175   public getChannel<const T extends ChannelType = ChannelType>(
                               ~

node_modules/discord.js/typings/index.d.ts:1175:29 - error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.

1175   public getChannel<const T extends ChannelType = ChannelType>(
                                 ~~~~~~~

node_modules/discord.js/typings/index.d.ts:1176:9 - error TS1005: ')' expected.

1176     name: string,
             ~

node_modules/discord.js/typings/index.d.ts:1176:11 - error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.

1176     name: string,
...
Found 97 errors in the same file, starting at: node_modules/discord.js/typings/index.d.ts:1175
copper terraceBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
final tusk
#

update your typescript version. v14.12.1 needs the latest ts version which is currently 5.1.6 iirc

ivory grotto
#

Yea... something obvious then, wasn't using@latest on my typescript upgrade so wasn't bumping to 5