Compilation Errors in Dependencies

Hey, I'm trying to create a new project, but when running tsc to build the bot I get many errors.
node_modules/@sapphire/result/dist/cjs/index.d.cts:832:5 - error TS2416: Property 'isOkAnd' in type 'ResultOk<T>' is not assignable to the same property in base type 'IResult<T, any>'.
Type '<R extends boolean>(cb: (value: T) => R) => R' is not assignable to type '<R extends boolean>(cb: (value: T) => R) => this is ResultOk<T> & R'.
Signature '(cb: (value: T) => R): R' must be a type predicate.

832 isOkAnd<R extends boolean>(cb: (value: T) => R): R;
node_modules/@sapphire/result/dist/cjs/index.d.cts:832:5 - error TS2416: Property 'isOkAnd' in type 'ResultOk<T>' is not assignable to the same property in base type 'IResult<T, any>'.
Type '<R extends boolean>(cb: (value: T) => R) => R' is not assignable to type '<R extends boolean>(cb: (value: T) => R) => this is ResultOk<T> & R'.
Signature '(cb: (value: T) => R): R' must be a type predicate.

832 isOkAnd<R extends boolean>(cb: (value: T) => R): R;
There are more errors in this file from similar methods (isErr, isErrAnd, isNone, ...) And also some errors between @types/node and discord.js.
node_modules/@types/node/events.d.ts:503:30 - error TS2300: Duplicate identifier 'EventEmitter'.

503 export { internal as EventEmitter };
~~~~~~~~~~~~
node_modules/discord.js/typings/index.d.ts:246:9
246 class EventEmitter {
~~~~~~~~~~~~
'EventEmitter' was also declared here.
node_modules/@types/node/events.d.ts:503:30 - error TS2300: Duplicate identifier 'EventEmitter'.

503 export { internal as EventEmitter };
~~~~~~~~~~~~
node_modules/discord.js/typings/index.d.ts:246:9
246 class EventEmitter {
~~~~~~~~~~~~
'EventEmitter' was also declared here.
And similar ones I thought maybe me dependencies do not match or so, but I tried using other versions too and didn't notice anything different Here are my deps
"dependencies": {
"@prisma/client": "^5.17.0",
"@sapphire/decorators": "^6.1.0",
"@sapphire/framework": "^5.2.1",
"@sapphire/plugin-logger": "^4.0.2",
"@sapphire/utilities": "^3.17.0",
"@skyra/env-utilities": "^1.3.0",
"colorette": "^2.0.20",
"discord.js": "14.x"
},
"devDependencies": {
"@sapphire/eslint-config": "^5.0.5",
"@sapphire/ts-config": "^5.0.1",
"@types/node": "^20.14.12",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"eslint": "8.57.0",
"eslint-config-prettier": "^9.1.0",
"prettier": "^3.3.3",
"prisma": "^5.17.0",
"tsc-watch": "^6.2.0",
"typescript": "*"
}
"dependencies": {
"@prisma/client": "^5.17.0",
"@sapphire/decorators": "^6.1.0",
"@sapphire/framework": "^5.2.1",
"@sapphire/plugin-logger": "^4.0.2",
"@sapphire/utilities": "^3.17.0",
"@skyra/env-utilities": "^1.3.0",
"colorette": "^2.0.20",
"discord.js": "14.x"
},
"devDependencies": {
"@sapphire/eslint-config": "^5.0.5",
"@sapphire/ts-config": "^5.0.1",
"@types/node": "^20.14.12",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"eslint": "8.57.0",
"eslint-config-prettier": "^9.1.0",
"prettier": "^3.3.3",
"prisma": "^5.17.0",
"tsc-watch": "^6.2.0",
"typescript": "*"
}
Does someone has an idea how to fix this?
Solution:
Oh sorry, seems like I found the solution in an older post 😅 Didn't notice it at first because of the title. For anyone searching: https://discord.com/channels/737141877803057244/1255166271432163399/1255178804385812571...
Jump to solution
1 Reply
Solution
Peace
Peace•3mo ago
Oh sorry, seems like I found the solution in an older post 😅 Didn't notice it at first because of the title. For anyone searching: https://discord.com/channels/737141877803057244/1255166271432163399/1255178804385812571
Want results from more Discord servers?
Add your server