Lambo
Explore posts from serversCDCloudflare Developers
•Created by Lambo on 6/2/2024 in #pages-help
Mono Repo Deployment With Root Directory
Hi there,
I have my Cloudflare Pages site within a mono repo along side my workers.
This has worked well, however, I have recently started breaking my code up into several packages via NPM workspaces.
This means that the
functions/tsconfig.json
is extending the one in the root of my mono repo, to avoid having duplicated config.
However, because I have the root directory configured to be the pages
directory in my mono repo, it can not obviously find the root tsconfig.json
I can see two potential fixes to this:
- Do not set pages
as a root directory, but this would mean pushing more than I need to Pages
- Do not extend the functions tsconfig.json
and duplicate the config
Neither of these approaches seem ideal, does anyone have any other suggestions or recomend a certain way?
Thanks1 replies
DIAdiscord.js - Imagine an app
•Created by Lambo on 4/19/2024 in #djs-voice
Bot Works Locally, In Production Player States Goes To Idle Straight Away?
Hi,
I'm having an issue with my bot in production. It works fine locally (macOS), but in production (Docker
node:20
image), the player state changes from playing
to idle
straight away:
This is from:
Does anyone have some pointers as to thing I should check, as to why this may occur?
Thanks12 replies
DIAdiscord.js - Imagine an app
•Created by Lambo on 3/11/2024 in #djs-questions
Discord.js 14.14.1 Type Errors
Hi, I'm trying to upgrade from 14.7.1 to 14.14.1. However, when I now go to transpile my code I get 97 errors from the Discord.js typings folder. I have
skipLibCheck
enabled in my TSConfig, so I'm not sure what's going on here. Any ideas? (node 20.11.1)3 replies
CDCloudflare Developers
•Created by Lambo on 12/10/2023 in #pages-help
Help With _routes.json File
Hello, I am a bit confused by the
_routes.json
file. I have added the file to my functions
directory with the following config:
I have another file [article].ts
in my functions
folder with the following code, for testing purposes:
My understanding of the _routes.json
is that I should not see a Hit
log for when I visit my Pages site at http://localhost:8788
, however, I see Hit: manifest.json
in the logs (nothing for the index route itself).
Why is this?
Essentially, what I am after is for the static page to load for /
, but then all other routes to fallback to my [article].ts
function.1 replies
CDCloudflare Developers
•Created by Lambo on 11/29/2023 in #workers-help
Scheduled Worker 504 Gateway Time-out
Hello,
I'm suddenly getting a
504 Gateway Time-out
when visting http://localhost:8787/__scheduled?cron=*+*+*+*+*
to test my scheduled worker via npx wrangler dev --test-scheduled
.
This only happens when local mode is turned off. If local mode is enabled I just get an error in the console stating the table does not exist (which is correct).
I'm not really sure what could have caused this. I am on my master
branch which was working a couple days ago, so I have changed no code. Does anyone have ideas on what could cause this?
Happy to supply any code/config. Thanks.6 replies
DIAdiscord.js - Imagine an app
•Created by Lambo on 3/10/2023 in #djs-voice
No Audio Is Played
Hello! I'm new to using
@discordjs/voice
so I'm hoping I'm just missing something simple.
I'm trying to get my bot to play a local audio file within voice. The bot joins the channel, but doesn't make a noise.
This is the relevant code:
I was wondering if anyone could point me in the direction of the cause? The bot is auto-pausing so I believe it is do with the resource. Thank you!
[email protected]
@discordjs/[email protected]
node v18.13.050 replies