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

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
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
4 Replies
d.js toolkit
d.js toolkit17mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - 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!
Drunkan
DrunkanOP17mo ago
- [email protected] & v20.3.1
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
Drunkan
DrunkanOP17mo ago
Yea... something obvious then, wasn't using@latest on my typescript upgrade so wasn't bumping to 5 cheers - this is solved
Want results from more Discord servers?
Add your server