MrDiamond
MrDiamond
Explore posts from servers
CDCloudflare Developers
Created by MrDiamond on 10/21/2023 in #workers-help
globalThis.XMLHttpRequest is not a constructor
I am trying to use wrangler deploy to deploy my app, but it keeps giving this error. I am not using XMLHttpRequest afaik. Dependencies:
"devDependencies": {
"@types/express": "^4.17.20",
"@types/node": "^20.8.7",
"nodemon": "^3.0.1",
"tsx": "^3.14.0",
"typescript": "^5.2.2",
"wrangler": "^3.14.0"
},
"dependencies": {
"canvas": "^2.11.2",
"define-data-property": "^1.1.1",
"discord-interactions": "^3.4.0",
"dotenv": "^16.3.1",
"express": "^4.18.2"
}
"devDependencies": {
"@types/express": "^4.17.20",
"@types/node": "^20.8.7",
"nodemon": "^3.0.1",
"tsx": "^3.14.0",
"typescript": "^5.2.2",
"wrangler": "^3.14.0"
},
"dependencies": {
"canvas": "^2.11.2",
"define-data-property": "^1.1.1",
"discord-interactions": "^3.4.0",
"dotenv": "^16.3.1",
"express": "^4.18.2"
}
wrangler.toml
name = "discord-bot"
main = "./dist/index.js"
compatibility_date = "2023-10-21"
node_compat = true
name = "discord-bot"
main = "./dist/index.js"
compatibility_date = "2023-10-21"
node_compat = true
Full error
Uncaught TypeError: globalThis.XMLHttpRequest is not a constructor
at worker.js:31375:13 in checkTypeSupport
at worker.js:31397:40 in
node_modules/rollup-plugin-node-polyfills/polyfills/http-lib/capability.js
at worker.js:15:58 in __init
at worker.js:31662:7 in node_modules/rollup-plugin-node-polyfills/polyfills/http-lib/request.js
at worker.js:15:58 in __init
at worker.js:31880:7 in node-modules-polyfills:http
at worker.js:15:58 in __init
at worker.js:32000:23 in node-modules-polyfills-commonjs:http
at worker.js:18:52 in __require2
at worker.js:32019:18 in node_modules/methods/index.js
[code: 10021]
Uncaught TypeError: globalThis.XMLHttpRequest is not a constructor
at worker.js:31375:13 in checkTypeSupport
at worker.js:31397:40 in
node_modules/rollup-plugin-node-polyfills/polyfills/http-lib/capability.js
at worker.js:15:58 in __init
at worker.js:31662:7 in node_modules/rollup-plugin-node-polyfills/polyfills/http-lib/request.js
at worker.js:15:58 in __init
at worker.js:31880:7 in node-modules-polyfills:http
at worker.js:15:58 in __init
at worker.js:32000:23 in node-modules-polyfills-commonjs:http
at worker.js:18:52 in __require2
at worker.js:32019:18 in node_modules/methods/index.js
[code: 10021]
17 replies
WWasp-lang
Created by MrDiamond on 8/5/2023 in #🙋questions
Can you host a wasp app on Oracle Cloud?
Looking for a free way of hosting, and oracle looks promising, but I'm not entirely sure.
3 replies
WWasp-lang
Created by MrDiamond on 7/19/2023 in #🙋questions
Entity in Typescript does not have all properties
No description
14 replies
DIAdiscord.js - Imagine an app
Created by MrDiamond on 8/18/2022 in #djs-voice
Very weird error from YTDL
10 replies
DIAdiscord.js - Imagine an app
Created by MrDiamond on 8/15/2022 in #djs-voice
bit won’t join voice channel
My bot won't join my voice channel, does anyone know why? there is no errors
message.channel.send(`Playing ${args[1]}`);

var connection = joinVoiceChannel({
guildID: message.guild.id,
channelID: message.member.voice.channel.id,
adapterCreator: message.guild.voiceAdapterCreator
})

connection.on(VoiceConnectionStatus.Ready, () => {
console.log("Voice connection ready");
const player = createAudioPlayer();
connection.subscribe(player);

const audio = createAudioResource('./music.mp3');
player.play(audio);
})
message.channel.send(`Playing ${args[1]}`);

var connection = joinVoiceChannel({
guildID: message.guild.id,
channelID: message.member.voice.channel.id,
adapterCreator: message.guild.voiceAdapterCreator
})

connection.on(VoiceConnectionStatus.Ready, () => {
console.log("Voice connection ready");
const player = createAudioPlayer();
connection.subscribe(player);

const audio = createAudioResource('./music.mp3');
player.play(audio);
})
7 replies
DIAdiscord.js - Imagine an app
Created by MrDiamond on 8/15/2022 in #djs-voice
Bot won't join vc
My bot won't join my voice channel, does anyone know why? there is no errors
message.channel.send(`Playing ${args[1]}`);

var connection = joinVoiceChannel({
guildID: message.guild.id,
channelID: message.member.voice.channel.id,
adapterCreator: message.guild.voiceAdapterCreator
})

connection.on(VoiceConnectionStatus.Ready, () => {
console.log("Voice connection ready");
const player = createAudioPlayer();
connection.subscribe(player);

const audio = createAudioResource('./music.mp3');
player.play(audio);
})
message.channel.send(`Playing ${args[1]}`);

var connection = joinVoiceChannel({
guildID: message.guild.id,
channelID: message.member.voice.channel.id,
adapterCreator: message.guild.voiceAdapterCreator
})

connection.on(VoiceConnectionStatus.Ready, () => {
console.log("Voice connection ready");
const player = createAudioPlayer();
connection.subscribe(player);

const audio = createAudioResource('./music.mp3');
player.play(audio);
})
3 replies
DIAdiscord.js - Imagine an app
Created by MrDiamond on 8/15/2022 in #djs-questions
Bot won't join Voice Channel
I use the command, and it gets stuck trying to join the voice channel.
message.channel.send(`Playing ${args[1]}`);

var connection = joinVoiceChannel({
guildID: message.guild.id,
channelID: message.member.voice.channel.id,
adapterCreator: message.guild.voiceAdapterCreator
})

connection.on(VoiceConnectionStatus.Ready, () => {
console.log("Voice connection ready");
const player = createAudioPlayer();
connection.subscribe(player);

const audio = createAudioResource('./music.mp3');
player.play(audio);
})
message.channel.send(`Playing ${args[1]}`);

var connection = joinVoiceChannel({
guildID: message.guild.id,
channelID: message.member.voice.channel.id,
adapterCreator: message.guild.voiceAdapterCreator
})

connection.on(VoiceConnectionStatus.Ready, () => {
console.log("Voice connection ready");
const player = createAudioPlayer();
connection.subscribe(player);

const audio = createAudioResource('./music.mp3');
player.play(audio);
})
3 replies