⛧Bζ͜͡annerBomb⛧
DIAdiscord.js - Imagine an app
•Created by ⛧Bζ͜͡annerBomb⛧ on 8/11/2024 in #djs-questions
Error installing packages.
I thought I resolved it but didn't. I am running into this problem when trying to install packages. What would you suggest I do to resolve them or track down what's causing it?
node_modules/@types/node/events.d.ts(503,30): error TS2300: Duplicate identifier 'EventEmitter'.
node_modules/@types/node/stream.d.ts(53,11): error TS2420: Class 'ReadableBase' incorrectly implements interface 'ReadableStream'.
Type 'ReadableBase' is missing the following properties from type 'ReadableStream': off, removeAllListeners, setMaxListeners, getMaxListeners, and 4 more.
node_modules/@types/node/stream.d.ts(662,11): error TS2420: Class 'WritableBase' incorrectly implements interface 'WritableStream'.
Type 'WritableBase' is missing the following properties from type 'WritableStream': off, removeAllListeners, setMaxListeners, getMaxListeners, and 4 more.
node_modules/@types/node/test.d.ts(377,11): error TS2420: Class 'TestsStream' incorrectly implements interface 'ReadableStream'.
Type 'TestsStream' is missing the following properties from type 'ReadableStream': off, removeAllListeners, setMaxListeners, getMaxListeners, and 4 more.
node_modules/discord.js/typings/index.d.ts(246,9): error TS2300: Duplicate identifier 'EventEmitter'.
The command '/bin/sh -c npm run tsc' returned a non-zero code: 1
node_modules/@types/node/events.d.ts(503,30): error TS2300: Duplicate identifier 'EventEmitter'.
node_modules/@types/node/stream.d.ts(53,11): error TS2420: Class 'ReadableBase' incorrectly implements interface 'ReadableStream'.
Type 'ReadableBase' is missing the following properties from type 'ReadableStream': off, removeAllListeners, setMaxListeners, getMaxListeners, and 4 more.
node_modules/@types/node/stream.d.ts(662,11): error TS2420: Class 'WritableBase' incorrectly implements interface 'WritableStream'.
Type 'WritableBase' is missing the following properties from type 'WritableStream': off, removeAllListeners, setMaxListeners, getMaxListeners, and 4 more.
node_modules/@types/node/test.d.ts(377,11): error TS2420: Class 'TestsStream' incorrectly implements interface 'ReadableStream'.
Type 'TestsStream' is missing the following properties from type 'ReadableStream': off, removeAllListeners, setMaxListeners, getMaxListeners, and 4 more.
node_modules/discord.js/typings/index.d.ts(246,9): error TS2300: Duplicate identifier 'EventEmitter'.
The command '/bin/sh -c npm run tsc' returned a non-zero code: 1
11 replies
DIAdiscord.js - Imagine an app
•Created by ⛧Bζ͜͡annerBomb⛧ on 8/11/2024 in #djs-questions
Error when installing packages
Hey I am running into this problem when trying to install packages. What would you suggest I do to resolve them?
node_modules/@types/node/events.d.ts(503,30): error TS2300: Duplicate identifier 'EventEmitter'.
node_modules/@types/node/stream.d.ts(53,11): error TS2420: Class 'ReadableBase' incorrectly implements interface 'ReadableStream'.
Type 'ReadableBase' is missing the following properties from type 'ReadableStream': off, removeAllListeners, setMaxListeners, getMaxListeners, and 4 more.
node_modules/@types/node/stream.d.ts(662,11): error TS2420: Class 'WritableBase' incorrectly implements interface 'WritableStream'.
Type 'WritableBase' is missing the following properties from type 'WritableStream': off, removeAllListeners, setMaxListeners, getMaxListeners, and 4 more.
node_modules/@types/node/test.d.ts(377,11): error TS2420: Class 'TestsStream' incorrectly implements interface 'ReadableStream'.
Type 'TestsStream' is missing the following properties from type 'ReadableStream': off, removeAllListeners, setMaxListeners, getMaxListeners, and 4 more.
node_modules/discord.js/typings/index.d.ts(246,9): error TS2300: Duplicate identifier 'EventEmitter'.
The command '/bin/sh -c npm run tsc' returned a non-zero code: 1
node_modules/@types/node/events.d.ts(503,30): error TS2300: Duplicate identifier 'EventEmitter'.
node_modules/@types/node/stream.d.ts(53,11): error TS2420: Class 'ReadableBase' incorrectly implements interface 'ReadableStream'.
Type 'ReadableBase' is missing the following properties from type 'ReadableStream': off, removeAllListeners, setMaxListeners, getMaxListeners, and 4 more.
node_modules/@types/node/stream.d.ts(662,11): error TS2420: Class 'WritableBase' incorrectly implements interface 'WritableStream'.
Type 'WritableBase' is missing the following properties from type 'WritableStream': off, removeAllListeners, setMaxListeners, getMaxListeners, and 4 more.
node_modules/@types/node/test.d.ts(377,11): error TS2420: Class 'TestsStream' incorrectly implements interface 'ReadableStream'.
Type 'TestsStream' is missing the following properties from type 'ReadableStream': off, removeAllListeners, setMaxListeners, getMaxListeners, and 4 more.
node_modules/discord.js/typings/index.d.ts(246,9): error TS2300: Duplicate identifier 'EventEmitter'.
The command '/bin/sh -c npm run tsc' returned a non-zero code: 1
2 replies
DIAdiscord.js - Imagine an app
•Created by ⛧Bζ͜͡annerBomb⛧ on 1/9/2024 in #djs-questions
Question with creating a sticker
Why when creating a sticker using a image url as the attachment property it works. But this errors? My code is
which errors with
But adding a straight URL to the property works just fine. This code is literally just taking the attachment URL and putting it in for attachment property.
const message = msg.channel.messages.cache.get('1194121140684202034'); // Message with attachment image
const atmt = message.attachments.find((att) => att.width != undefined && att.height != undefined && att.attachment != undefined);
msg.guild.stickers.create({ attachment: atmt.attachment, name: 'teststicker', tags: '\u{1F604}' });
const message = msg.channel.messages.cache.get('1194121140684202034'); // Message with attachment image
const atmt = message.attachments.find((att) => att.width != undefined && att.height != undefined && att.attachment != undefined);
msg.guild.stickers.create({ attachment: atmt.attachment, name: 'teststicker', tags: '\u{1F604}' });
TypeError: Cannot read properties of undefined (reading 'pipe')
at Function.resolveFile (/opt/stratobotelite/node_modules/discord.js/src/structures/MessagePayload.js:251:85)
at GuildStickerManager.create (/opt/stratobotelite/node_modules/discord.js/src/managers/GuildStickerManager.js:61:47)
at eval (eval at eval (/opt/stratobotelite/src/bot/commands/Admin/eval.js:226:13), <anonymous>:3:20)
at module.exports.eval (/opt/stratobotelite/src/bot/commands/Admin/eval.js:226:13)
at module.exports.timedEval (/opt/stratobotelite/src/bot/commands/Admin/eval.js:196:60)
at module.exports.run (/opt/stratobotelite/src/bot/commands/Admin/eval.js:131:54)
at module.exports.runCommand (/opt/stratobotelite/src/bot/monitors/commandHandler.js:71:26)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async module.exports._run (/opt/stratobotelite/src/frameworks/klasa/lib/structures/Monitor.js:99:4)
TypeError: Cannot read properties of undefined (reading 'pipe')
at Function.resolveFile (/opt/stratobotelite/node_modules/discord.js/src/structures/MessagePayload.js:251:85)
at GuildStickerManager.create (/opt/stratobotelite/node_modules/discord.js/src/managers/GuildStickerManager.js:61:47)
at eval (eval at eval (/opt/stratobotelite/src/bot/commands/Admin/eval.js:226:13), <anonymous>:3:20)
at module.exports.eval (/opt/stratobotelite/src/bot/commands/Admin/eval.js:226:13)
at module.exports.timedEval (/opt/stratobotelite/src/bot/commands/Admin/eval.js:196:60)
at module.exports.run (/opt/stratobotelite/src/bot/commands/Admin/eval.js:131:54)
at module.exports.runCommand (/opt/stratobotelite/src/bot/monitors/commandHandler.js:71:26)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async module.exports._run (/opt/stratobotelite/src/frameworks/klasa/lib/structures/Monitor.js:99:4)
3 replies