Tag : node.js

node: v20.12.1 OS: mac The correct code: import fs from ‘node:fs/promises’ const dir = ‘./a/b/c’ fs.access(dir).catch((e) => { return fs.mkdir(dir, { recursive: true }) }).then(() => { fs.writeFile(`${dir}/hello2.txt`, ‘Hello, World!’) }) But I would like to know why fs.writeFile execution fails after removing return, and fs.mkdir also fails. import fs from ‘node:fs/promises’ const dir = ..

Read more

I’m facing an issue with updating the WebSocket endpoint configuration in Erela.js to connect to my Lavalink server. I’ve recently upgraded my Lavalink server to a newer version, which requires using a different WebSocket endpoint (/v4/websocket). Despite trying to update the Erela.js library and all its plugins using npm update erela.js, I haven’t been successful in resolving the ..

Read more

I’m currently facing an issue with updating the WebSocket endpoint configuration in Erela.js to connect to my Lavalink server. I’ve recently upgraded my Lavalink server to a newer version, which requires using a different WebSocket endpoint (/v4/websocket). Despite trying to update the Erela.js library and all its plugins using npm update erela.js, I haven’t been successful in resolving the ..

Read more