#stdin is a ReadStream but readline interface requires ReadableStream
21 messages · Page 1 of 1 (latest)
it was okay until i turned on a more recent and strict typescript
now it complains for some reason
maybe i miss some kind of tsconfig setting?
Can you show your tsconfig and package.json?
{
"type": "module",
"main": "./out/main.js",
"dependencies": {
"@types/node": "^20.14.8",
"discord.js": "^14.15.3"
},
"devDependencies": {
"typescript": "^5.5.2"
}
}
``````json
{
"compilerOptions": {
"allowArbitraryExtensions": false,
"allowImportingTsExtensions": false,
"allowUmdGlobalAccess": false,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"alwaysStrict": true,
"exactOptionalPropertyTypes": true,
"incremental": true,
"module": "Node16",
"moduleResolution": "Node16",
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"sourceMap": true,
"strictBindCallApply": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"useUnknownInCatchVariables": true,
"outDir": "build",
"strict": true
}
}
modules were nodenext but changing to node 16 didn't help
could it be some changes with permissions or something?
https://nodejs.org/en/blog/announcements/v20-release-announce#permission-model
Your exact code works in TS playground, so it might be a setup issue.
What do you see when you run tsc?
hm
i experimented a little and this issue starts somewhere between typescript 5.5.0-beta and 5.5.1-rc
regression comes from this version and later
https://www.npmjs.com/package/typescript/v/5.5.0-dev.20240524
or not a regression, my issue
you know how can i install specific commit to test it?
No but I mean if it works on playground using the same TS 5.5.2, then the issue is likely your setup not the version of TS.
okay, thats some weird combination of discord js 14+ and new typescript builds
probably discord.js issue. thanks for help
it's indeed discord.js issue
its not d.js issue more so than ts 5.5.2 fixing a bug that we were "using"
https://github.com/discordjs/discord.js/issues/10358#issuecomment-2183109022
why is it for readablestream idk
@their dev on discord server