Bloxs
Bloxs
Explore posts from servers
DDeno
Created by Bloxs on 10/27/2024 in #help
Running Fresh app on Windows with pm2
I'm trying to run a fresh project in a production environment (windows server) but for some reason whenever I run deno via pm2 it panics with a "The handle is invalid (OS Error 6)" message when I try to run it. I was also able to reproduce this on a regular windows 11 install. Interestingly I'm unable to reproduce this on a mac device which I used to develop the website. Is there some sort of config setting I need to enable for pm2 other than specifying deno as the interpreter? I'm using deno 2.0.3
3 replies
DDeno
Created by Bloxs on 6/1/2024 in #help
Deno LSP doesn't recognize workspaces as imports
For some reason the vscode plugin for deno says this code is invalid even though it runs perfectly fine via the cli. mod.ts:
import { add } from "@mypackage/test";

console.log(add(1, 2)); // 3
import { add } from "@mypackage/test";

console.log(add(1, 2)); // 3
deno.jsonc:
{
"name": "@mypackage/root",
"version": "0.0.1",
"workspaces": [
"./test"
]
}
{
"name": "@mypackage/root",
"version": "0.0.1",
"workspaces": [
"./test"
]
}
./test/mod.ts
export const add = (a: number, b: number) => a + b;
export const add = (a: number, b: number) => a + b;
./test/deno.jsonc
{
"name": "@mypackage/test",
"version": "0.0.1",
"exports": "./mod.ts"
}
{
"name": "@mypackage/test",
"version": "0.0.1",
"exports": "./mod.ts"
}
When I run mod.ts via the cli I get 3 which is expected but the vscode lsp says Relative import path "@mypackage/test" not prefixed with / or ./ or ../
4 replies
DFDimensional Fun
Created by Bloxs on 2/24/2024 in #lavaclient
Error: Unexpected server response: 200
When using lavaclient via deno's npm support (I was using lavadeno but that isn't updated to lavalink 4) with a lavalink 4 node I get the following error:
Error: Error: Unexpected server response: 200
at Connection._onerror (file:///home/blocks/.cache/deno/npm/registry.npmjs.org/lavaclient/4.1.1/dist/lib/node/Connection.js:145:33)
at callListener (file:///home/blocks/.cache/deno/npm/registry.npmjs.org/ws/8.16.0/lib/event-target.js:290:14)
at WebSocket.onError (file:///home/blocks/.cache/deno/npm/registry.npmjs.org/ws/8.16.0/lib/event-target.js:230:9)
at WebSocket.emit (ext:deno_node/_events.mjs:383:28)
at emitErrorAndClose (file:///home/blocks/.cache/deno/npm/registry.npmjs.org/ws/8.16.0/lib/websocket.js:1033:13)
at processTicksAndRejections (ext:deno_node/_next_tick.ts:33:15)
at runNextTicks (ext:deno_node/_next_tick.ts:71:3)
at eventLoopTick (ext:core/01_core.js:160:21)
Error: Error: Unexpected server response: 200
at Connection._onerror (file:///home/blocks/.cache/deno/npm/registry.npmjs.org/lavaclient/4.1.1/dist/lib/node/Connection.js:145:33)
at callListener (file:///home/blocks/.cache/deno/npm/registry.npmjs.org/ws/8.16.0/lib/event-target.js:290:14)
at WebSocket.onError (file:///home/blocks/.cache/deno/npm/registry.npmjs.org/ws/8.16.0/lib/event-target.js:230:9)
at WebSocket.emit (ext:deno_node/_events.mjs:383:28)
at emitErrorAndClose (file:///home/blocks/.cache/deno/npm/registry.npmjs.org/ws/8.16.0/lib/websocket.js:1033:13)
at processTicksAndRejections (ext:deno_node/_next_tick.ts:33:15)
at runNextTicks (ext:deno_node/_next_tick.ts:71:3)
at eventLoopTick (ext:core/01_core.js:160:21)
29 replies
DFDimensional Fun
Created by Bloxs on 10/9/2022 in #lavaclient
Any way to reconnect when node restarts
I'm currently using the reconnect: { basic: whatever } property in my nodes. While this works whenever the node requests a websocket reconnect it doesn't attempt to reconnect whenever the node is restarting
38 replies
DFDimensional Fun
Created by Bloxs on 10/2/2022 in #lavaclient
trackEnd event isn't fired after bot is dc'd and rejoins
For some reason the trackEnd event isn't fired in lavadeno if the bot was manually disconnected (by an admin) and then starts playing in the channel again, using lavadeno 3.2.3 (latest on deno.land), and harmony (from github not deno.land). Issue persists on both latest lavalink 3.5.1 and cog creators lavalink 3.4.0_1350 (tried cog creators as I thought it was a lavalink issue not lavadeno)
5 replies