jjjrmy
jjjrmy
Explore posts from servers
CDCloudflare Developers
Created by jjjrmy on 8/10/2024 in #pages-help
Build Requests `account_id` in Wrangler.toml but fails with `account_id`
https://dash.cloudflare.com/ab7347813b21ea6079df4cb18c4bb9e8/pages/view/exchange-traded-fund/952e6991-3192-47dd-9121-12b7bbce5d01

00:30:22.332 ✘ [ERROR] More than one account available but unable to select one in non-interactive mode.
00:30:22.332
00:30:22.332 Please set the appropriate `account_id` in your `wrangler.toml` file.
00:30:22.332 Available accounts are (`<name>`: `<account_id>`):

00:30:22.332 ✘ [ERROR] More than one account available but unable to select one in non-interactive mode.
00:30:22.332
00:30:22.332 Please set the appropriate `account_id` in your `wrangler.toml` file.
00:30:22.332 Available accounts are (`<name>`: `<account_id>`):
https://dash.cloudflare.com/ab7347813b21ea6079df4cb18c4bb9e8/pages/view/exchange-traded-fund/caf73d0b-3b79-4c19-9ce6-e83e33dac0f4
00:31:50.811 Found wrangler.toml file. Reading build configuration...
00:31:50.825
00:31:50.930 ✘ [ERROR] Running configuration file validation for Pages:
00:31:50.930
00:31:50.931 - Configuration file for Pages projects does not support "account_id"
00:31:50.811 Found wrangler.toml file. Reading build configuration...
00:31:50.825
00:31:50.930 ✘ [ERROR] Running configuration file validation for Pages:
00:31:50.930
00:31:50.931 - Configuration file for Pages projects does not support "account_id"
wrangler.toml
name = "echange-traded-fund"
pages_build_output_dir = "./dist"

compatibility_date = "2024-08-01"
compatibility_flags = [ "nodejs_compat" ]

account_id = "***"

[[kv_namespaces]]
binding = "KV"
id = "***"

[[d1_databases]]
binding = "DB"
database_name = "etf"
database_id = "***"
migrations_dir = "./../db/migrations"
name = "echange-traded-fund"
pages_build_output_dir = "./dist"

compatibility_date = "2024-08-01"
compatibility_flags = [ "nodejs_compat" ]

account_id = "***"

[[kv_namespaces]]
binding = "KV"
id = "***"

[[d1_databases]]
binding = "DB"
database_name = "etf"
database_id = "***"
migrations_dir = "./../db/migrations"
build command npm run build && npx wrangler d1 migrations apply etf
16 replies
CDCloudflare Developers
Created by jjjrmy on 5/24/2024 in #pages-help
Configuration file for Pages projects does not support "node_compat"
20:24:18.122 ✘ [ERROR] Running configuration file validation for Pages:
20:24:18.122
20:24:18.123 - Configuration file for Pages projects does not support "node_compat"
20:24:18.122 ✘ [ERROR] Running configuration file validation for Pages:
20:24:18.122
20:24:18.123 - Configuration file for Pages projects does not support "node_compat"
I'm having some compatability issues, where my code works on Workers but not on Pages Functions.
88 replies
CDCloudflare Developers
Created by jjjrmy on 5/18/2024 in #pages-help
Node Compat on Pages Functions
I'm trying to use Knex within my Nuxt project (Pages), but getting build errors due to node compatability. Setting the Compatability flag from within the dashboard does not help.
20:47:55.006 The package "timers" wasn't found on the file system but is built into node.
20:47:55.006 Add the "nodejs_compat" compatibility flag to your Pages project and make sure to prefix the module name with "node:" to enable Node.js compatibility.
20:47:55.006
20:47:55.006
20:47:55.007 ✘ [ERROR] Build failed with 18 errors:
20:47:55.007
20:47:55.007 ../node_modules/colorette/index.cjs:5:18: ERROR: Could not resolve "tty"
20:47:55.007 ../node_modules/knex/lib/builder-interface-augmenter.js:3:32: ERROR: Could not resolve "util"
20:47:55.007 ../node_modules/knex/lib/client.js:3:30: ERROR: Could not resolve "util"
20:47:55.007 ../node_modules/knex/lib/dialects/mysql/index.js:5:30: ERROR: Could not resolve "util"
20:47:55.007 ../node_modules/knex/lib/dialects/mysql/query/mysql-querycompiler.js:3:23: ERROR: Could not resolve "assert"
20:47:55.006 The package "timers" wasn't found on the file system but is built into node.
20:47:55.006 Add the "nodejs_compat" compatibility flag to your Pages project and make sure to prefix the module name with "node:" to enable Node.js compatibility.
20:47:55.006
20:47:55.006
20:47:55.007 ✘ [ERROR] Build failed with 18 errors:
20:47:55.007
20:47:55.007 ../node_modules/colorette/index.cjs:5:18: ERROR: Could not resolve "tty"
20:47:55.007 ../node_modules/knex/lib/builder-interface-augmenter.js:3:32: ERROR: Could not resolve "util"
20:47:55.007 ../node_modules/knex/lib/client.js:3:30: ERROR: Could not resolve "util"
20:47:55.007 ../node_modules/knex/lib/dialects/mysql/index.js:5:30: ERROR: Could not resolve "util"
20:47:55.007 ../node_modules/knex/lib/dialects/mysql/query/mysql-querycompiler.js:3:23: ERROR: Could not resolve "assert"
2 replies
DTDrizzle Team
Created by jjjrmy on 4/22/2024 in #help
Drizzle Query, Relationship Sub-Query
I have Domains and Products, and a pivot between them (DomainProducts). I'd like to query (findFirst) the DomainProducts where DomainProducts.Slug='hello-world' and DomainProducts.Domain.Url='mydomain.com' Is that possible? It seems like it's not possible to do it with the Query, instead I have to use it like a normal Select and manually do the join?
1 replies
CDCloudflare Developers
Created by jjjrmy on 3/27/2024 in #pages-help
Get Custom Domains For Pages
Within Astro config file, I need to include the domains of the application to use the Image component for external URLs (R2 Bucket for Assets). Is there any way to include the custom domains of my Pages project within my config?
4 replies
CDCloudflare Developers
Created by jjjrmy on 1/2/2024 in #pages-help
Worker exceeded resource limits
I deployed my site and it's working, but if I refresh it a few (~6) times in a row then I get an Error 1102 exceeded resource limits. What can I do to prevent this?
22 replies
CDCloudflare Developers
Created by jjjrmy on 12/22/2023 in #pages-help
Bind KV for Pages on Deploy
When I deploy my KV, especially as a new project through the Cloudflare Pages setup, is there a way to automatically bind a specific KV from the start instead of having to do it through the Functions Settings after it is created?
13 replies
CDCloudflare Developers
Created by jjjrmy on 12/10/2023 in #workers-help
AdonisJS `node:module` Error on Build
I have my environment variable set: NODE_VERSION 18.17.1 Yet when I build I get the following error, is this incompatible with Workers?
SyntaxError: The requested module 'node:module' does not provide an export named 'register'
SyntaxError: The requested module 'node:module' does not provide an export named 'register'
14 replies