☆彡
☆彡
SIASapphire - Imagine a framework
Created by ☆彡 on 7/20/2024 in #sapphire-support
Errors loading Commands and Listeners on bun run
so now errors dont throw. though it seems my slash commands or listeners aren't still registered. for the example above, i put in the event for voiceStateUpdate, and tested just joining a VC to see a console.log be fired, but didn't seem like anything got fired
19 replies
SIASapphire - Imagine a framework
Created by ☆彡 on 7/20/2024 in #sapphire-support
Errors loading Commands and Listeners on bun run
i see the issue now: the documentation mentions to set your "main" in the package.json to the src/index.js, so in my head i assumed it needed to point to my src/index.ts. but i guess based off the outDir in the tsConfig, have to point to dist/index.js
19 replies
SIASapphire - Imagine a framework
Created by ☆彡 on 7/20/2024 in #sapphire-support
Errors loading Commands and Listeners on bun run
is there a particular reason for that approach
19 replies
SIASapphire - Imagine a framework
Created by ☆彡 on 7/20/2024 in #sapphire-support
Errors loading Commands and Listeners on bun run
i guess ill try to look more in the example one, but the example one seems a bit weird, cause you essentially serve the bun.ts who then imports the main.ts to run
19 replies
SIASapphire - Imagine a framework
Created by ☆彡 on 7/20/2024 in #sapphire-support
Errors loading Commands and Listeners on bun run
but i guess the return mjsImport(url) returns back an empty object
19 replies
SIASapphire - Imagine a framework
Created by ☆彡 on 7/20/2024 in #sapphire-support
Errors loading Commands and Listeners on bun run
hmm, so i did update my package.json to type:"module" now and i can see that this.clientUsesESModules now returns true, so it grabs the url and appends the searchParams. so it looks like this:
URL {
href: "file:///home/thrump/projects/botc/src/commands/unmute.ts?d=1721576525813&name=unmute&extension=.ts",
origin: "null",
protocol: "file:",
username: "",
password: "",
host: "",
hostname: "",
port: "",
pathname: "/home/thrump/projects/botc/src/commands/unmute.ts",
hash: "",
search: "?d=1721576525813&name=unmute&extension=.ts",
searchParams: URLSearchParams {
"d": "1721576525813",
"name": "unmute",
"extension": ".ts",
},
toJSON: [Function: toJSON],
toString: [Function: toString],
}
URL {
href: "file:///home/thrump/projects/botc/src/commands/unmute.ts?d=1721576525813&name=unmute&extension=.ts",
origin: "null",
protocol: "file:",
username: "",
password: "",
host: "",
hostname: "",
port: "",
pathname: "/home/thrump/projects/botc/src/commands/unmute.ts",
hash: "",
search: "?d=1721576525813&name=unmute&extension=.ts",
searchParams: URLSearchParams {
"d": "1721576525813",
"name": "unmute",
"extension": ".ts",
},
toJSON: [Function: toJSON],
toString: [Function: toString],
}
19 replies
SIASapphire - Imagine a framework
Created by ☆彡 on 7/20/2024 in #sapphire-support
Errors loading Commands and Listeners on bun run
In the @sapphire/pieces
19 replies
SIASapphire - Imagine a framework
Created by ☆彡 on 7/20/2024 in #sapphire-support
Errors loading Commands and Listeners on bun run
So something related to esm module
19 replies
SIASapphire - Imagine a framework
Created by ☆彡 on 7/20/2024 in #sapphire-support
Errors loading Commands and Listeners on bun run
Sure, I'll try taking a look at this and nuke my node modules. One thing I did notice before my power went out, the file that's loading in the files, there was a check to see if it the file was a ts file and if it's an ESMmodule export and that ESMmodule was false
19 replies
SIASapphire - Imagine a framework
Created by ☆彡 on 7/20/2024 in #sapphire-support
Errors loading Commands and Listeners on bun run
same error
19 replies
SIASapphire - Imagine a framework
Created by ☆彡 on 7/20/2024 in #sapphire-support
Errors loading Commands and Listeners on bun run
decided to also give other configurations of the tsconfig.json, so tried this as well:
"compilerOptions": {
"lib": ["es2023"],
"module": "node16",
"target": "es2022",

"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"moduleResolution": "node16"
}
"compilerOptions": {
"lib": ["es2023"],
"module": "node16",
"target": "es2022",

"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"moduleResolution": "node16"
}
19 replies
SIASapphire - Imagine a framework
Created by ☆彡 on 7/20/2024 in #sapphire-support
Errors loading Commands and Listeners on bun run
@Boomeravna , sorry i was also testing to see if it was a bun runetime compiler/runetime issue so tried it with Deno but they both gave the same error
19 replies
SIASapphire - Imagine a framework
Created by ☆彡 on 7/20/2024 in #sapphire-support
Errors loading Commands and Listeners on bun run
{
"compilerOptions": {
// Enable latest features
"lib": ["ESNext", "DOM"],
"target": "ESNext",
"module": "ESNext",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,

// Bundler mode
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,

// Best practices
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,

// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
"noPropertyAccessFromIndexSignature": false
}
}
{
"compilerOptions": {
// Enable latest features
"lib": ["ESNext", "DOM"],
"target": "ESNext",
"module": "ESNext",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,

// Bundler mode
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,

// Best practices
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,

// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
"noPropertyAccessFromIndexSignature": false
}
}
19 replies