steveklebanoff
steveklebanoff
CDCloudflare Developers
Created by steveklebanoff on 10/8/2024 in #pages-help
node-postgres issue
I saw in the changelog:
The node-postgres (pg) driver is now supported for Pages applications using Hyperdrive.
But I can't get node-postgres to work on Pages. It works locally, but when I try to deploy I get:

Error: Build failed with 10 errors:
../node_modules/pg-connection-string/index.js:76:77: ERROR: Could not resolve "fs"
../node_modules/pg/lib/connection-parameters.js:3:18: ERROR: Could not resolve "dns"
../node_modules/pg/lib/connection.js:94:24: ERROR: Could not resolve "net"
../node_modules/pg/lib/crypto/utils-legacy.js:5:27: ERROR: Could not resolve "crypto"
../node_modules/pg/lib/crypto/utils-webcrypto.js:1:27: ERROR: Could not resolve "crypto"
...
at failureErrorWithLog (/Users/steve/dev/egg-wars-2/node_modules/esbuild/lib/main.js:1636:15)
at /Users/steve/dev/egg-wars-2/node_modules/esbuild/lib/main.js:1048:25
at /Users/steve/dev/egg-wars-2/node_modules/esbuild/lib/main.js:1512:9
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
errors: [
{
detail: undefined,
id: '',
location: {
column: 77,
file: '../node_modules/pg-connection-string/index.js',
length: 4,
line: 76,
lineText: " const fs = config.sslcert || config.sslkey || config.sslrootcert ? require('fs') : null",
namespace: '',
suggestion: ''
},
notes: [
{
location: null,
text: `The package "fs" wasn't found on the file system but is built into node.\n` +
'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.'
}
],
pluginName: '',
text: 'Could not resolve "fs"'
},

Error: Build failed with 10 errors:
../node_modules/pg-connection-string/index.js:76:77: ERROR: Could not resolve "fs"
../node_modules/pg/lib/connection-parameters.js:3:18: ERROR: Could not resolve "dns"
../node_modules/pg/lib/connection.js:94:24: ERROR: Could not resolve "net"
../node_modules/pg/lib/crypto/utils-legacy.js:5:27: ERROR: Could not resolve "crypto"
../node_modules/pg/lib/crypto/utils-webcrypto.js:1:27: ERROR: Could not resolve "crypto"
...
at failureErrorWithLog (/Users/steve/dev/egg-wars-2/node_modules/esbuild/lib/main.js:1636:15)
at /Users/steve/dev/egg-wars-2/node_modules/esbuild/lib/main.js:1048:25
at /Users/steve/dev/egg-wars-2/node_modules/esbuild/lib/main.js:1512:9
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
errors: [
{
detail: undefined,
id: '',
location: {
column: 77,
file: '../node_modules/pg-connection-string/index.js',
length: 4,
line: 76,
lineText: " const fs = config.sslcert || config.sslkey || config.sslrootcert ? require('fs') : null",
namespace: '',
suggestion: ''
},
notes: [
{
location: null,
text: `The package "fs" wasn't found on the file system but is built into node.\n` +
'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.'
}
],
pluginName: '',
text: 'Could not resolve "fs"'
},
2 replies
CDCloudflare Developers
Created by steveklebanoff on 7/8/2024 in #general-help
DNS Error
I have our root domain managed and hosted on vercel. I'd like to configure a subdomain of this domain to be hosted by cloudflare. I set the CName as suggested (Name: <my-subdomain) Target: <my-pages-name>.pages.dev) in my Vercel's DNS settings When I go to "Custom domains" settings in my pages project, it shows the subdomain but says Inactive (Error) and when I go to the URL I see:
This site can’t provide a secure <my subdomain>.<my domain>.app uses an unsupported protocol.
ERR_SSL_VERSION_OR_CIPHER_MISMATCH
This site can’t provide a secure <my subdomain>.<my domain>.app uses an unsupported protocol.
ERR_SSL_VERSION_OR_CIPHER_MISMATCH
Do I need to do anything else to configure it?
3 replies
CDCloudflare Developers
Created by steveklebanoff on 5/7/2024 in #pages-help
Error when following "Deploy a Hono site" instructions
No description
2 replies
CDCloudflare Developers
Created by steveklebanoff on 4/23/2024 in #workers-help
Enable Unbound billing
I'm getting the error "Worker exceeded CPU time limit" and would like to see if changing my plan to Unbound fixes this. Where in the cloudflare dashboard can I change the settings to unbound? Or do I just need to do this in the wranger.toml?
6 replies