vitaly
05/26/2023, 9:28 AMNepollo
05/26/2023, 12:32 PMhttps://cdn.discordapp.com/attachments/1111632845321019473/1111632876962852954/image.png▾
Eamag
05/26/2023, 3:05 PMIDisposable
05/26/2023, 3:57 PMiCode
05/27/2023, 8:20 PMtheMackabu
05/28/2023, 1:14 AM90e573cb19849ba7d4a553766544b9b0
When I try to link my new github account to cloudflare, it fails to link. There is no error, but it does not appear in the dropdown when creating a new pages site. Ive also tried unlinking and relinking to no avail?
(Problem seems very similar to https://discord.com/channels/595317990191398933/789155108529111069/1056577433261854720 for reference)psm
05/28/2023, 10:04 PM.gitignore
, but the fonts need to get to Cloudflare somehow. I currently have Cloudflare set to deploy my site from the GitHub repo, but I can't upload the fonts to GitHub, so how should I deploy my site instead?fantucifq
07/31/2023, 11:11 PM[error] Cannot resolve "canvas" from "/opt/buildhome/repo/node_modules/.pnpm/linkedom@0.15.1/node_modules/linkedom/commonjs/canvas.cjs" and externals are not allowed!
at Object.resolveId (node_modules/.pnpm/nitropack@2.5.2/node_modules/nitropack/dist/shared/nitro.7a525996.mjs:1781:17)
at async PluginDriver.hookFirstAndGetPlugin (node_modules/.pnpm/rollup@3.27.0/node_modules/rollup/dist/es/shared/node-entry.js:25256:28)
at async resolveId (node_modules/.pnpm/rollup@3.27.0/node_modules/rollup/dist/es/shared/node-entry.js:23931:26)
at async ModuleLoader.resolveId (node_modules/.pnpm/rollup@3.27.0/node_modules/rollup/dist/es/shared/node-entry.js:24345:15)
at async node_modules/.pnpm/@rollup+plugin-commonjs@25.0.3_rollup@3.27.0/node_modules/@rollup/plugin-commonjs/dist/es/index.js:778:16
at async Promise.all (index 0)
at async node_modules/.pnpm/@rollup+plugin-commonjs@25.0.3_rollup@3.27.0/node_modules/@rollup/plugin-commonjs/dist/es/index.js:770:32
at async rewriteRequireExpressionsAndGetImportBlock (node_modules/.pnpm/@rollup+plugin-commonjs@25.0.3_rollup@3.27.0/node_modules/@rollup/plugin-commonjs/dist/es/index.js:1346:28)
at async transformCommonjs (node_modules/.pnpm/@rollup+plugin-commonjs@25.0.3_rollup@3.27.0/node_modules/@rollup/plugin-commonjs/dist/es/index.js:1909:23)
at async transform (node_modules/.pnpm/rollup@3.27.0/node_modules/rollup/dist/es/shared/node-entry.js:24263:16)
has anyone seen a similar error? Using Node 18.16.1 and nuxt 3.6.5.crossbeau
08/17/2023, 12:07 AMp7m
08/26/2023, 6:44 PM✘ [ERROR] 2 error(s) and 0 warning(s) when compiling Worker.
20:36:18.056
20:36:18.056
20:36:18.059
20:36:18.061 ✘ [ERROR] [plugin wrangler-module-collector] ENOENT: no such file or directory, open '/opt/buildhome/repo/node_modules/@vercel/og/dist/resvg.wasm?module'
20:36:18.061
20:36:18.062 ../node_modules/@vercel/og/dist/index.edge.js:9:23:
20:36:18.062 9 │ import resvg_wasm from "./resvg.wasm?module";
20:36:18.062 ╵ ~~~~~~~~~~~~~~~~~~~~~
20:36:18.062
20:36:18.062 This error came from the "onResolve" callback registered here:
20:36:18.063
20:36:18.063 ../../../pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:124157:19:
20:36:18.063 124157 │ build5.onResolve(
20:36:18.063 ╵ ~~~~~~~~~
20:36:18.063
20:36:18.063 at /opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:124157:20
20:36:18.063 at Array.forEach (<anonymous>)
20:36:18.063 at /opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:124156:22
20:36:18.064 at Array.forEach (<anonymous>)
20:36:18.064 at setup (/opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:124153:16)
20:36:18.064 at handlePlugins (/opt/pages/build_tool/js/node_modules/wrangler/node_modules/esbuild/lib/main.js:1276:21)
20:36:18.064 at buildOrServeImpl (/opt/pages/build_tool/js/node_modules/wrangler/node_modules/esbuild/lib/main.js:965:5)
20:36:18.064 at Object.buildOrServe (/opt/pages/build_tool/js/node_modules/wrangler/node_modules/esbuild/lib/main.js:773:5)
20:36:18.064 at /opt/pages/build_tool/js/node_modules/wrangler/node_modules/esbuild/lib/main.js:2112:17
20:36:18.064
20:36:18.064
20:36:18.064 ✘ [ERROR] [plugin wrangler-module-collector] ENOENT: no such file or directory, open '/opt/buildhome/repo/node_modules/@vercel/og/dist/yoga.wasm?module'
20:36:18.065
20:36:18.065 ../node_modules/@vercel/og/dist/index.edge.js:10:22:
20:36:18.065 10 │ import yoga_wasm from "./yoga.wasm?module";
20:36:18.065 ╵ ~~~~~~~~~~~~~~~~~~~~
20:36:18.065
20:36:18.065 This error came from the "onResolve" callback registered here:
20:36:18.065
20:36:18.065 ../../../pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:124157:19:
20:36:18.066 124157 │ build5.onResolve(
20:36:18.066 ╵ ~~~~~~~~~
20:36:18.067
20:36:18.067
20:36:18.067 ✘ [ERROR] Build failed with 2 errors:
20:36:18.067
20:36:18.067 ../node_modules/@vercel/og/dist/index.edge.js:9:23: ERROR: [plugin: wrangler-module-collector] ENOENT: no such file or directory, open '/opt/buildhome/repo/node_modules/@vercel/og/dist/resvg.wasm?module'
20:36:18.068 ../node_modules/@vercel/og/dist/index.edge.js:10:22: ERROR: [plugin: wrangler-module-collector] ENOENT: no such file or directory, open '/opt/buildhome/repo/node_modules/@vercel/og/dist/yoga.wasm?module'
In the docs I saw no mention of having to do anything else other than installing the plugin. Am I missing something by chance?IanVS
09/25/2023, 2:35 PMnpx wrangler pages dev
. I can't point it to that folder, or else the app does not start correctly (I get 404's), and I can't use npx wrangler pages dev -- <COMMAND>
or else my functions are not found. Is there any way to support this structure?permaben
10/10/2023, 6:10 AMwrangler pages dev
? It would be supercool if Pages would work more like workers. I create a folder, can do all the config I do in the UI for setting up there including all the config I normally have for workers and then deploy like that.sanjay_26383
10/16/2023, 3:08 PMkdamp
11/03/2023, 5:23 PMhooks.server.ts
file looks like:
typescript
export const handle: Handle = async ({ event, resolve }) => {
if (dev) {
const mf = await import('./lib/server/miniflare');
event.platform = await mf.setupPlatform();
}
event.locals.db = getDB(event.platform!.env.DB);
event.locals.auth = getAuth(event.platform!.env.DB).handleRequest(event);
return await resolve(event);
};
I am using drizzle-orm and lucia-auth for this project. Here are some function definitions function getDB(db: D1Database) => DrizzleD1Database
and function getAuth(db: D1Database) => AuthRequest
(AuthRequest is a lucia type), however I don't think they are the issue, because it works just fine in my development environment with Miniflare.
Here is what my app.d.ts
file looks like:
typescript
/// <reference types="@sveltejs/adapter-cloudflare" />
declare global {
namespace App {
interface Locals {
auth: import("lucia").AuthRequest;
db: import('drizzle-orm/d1').DrizzleD1Database<typeof import('$lib/schema')>;
}
interface Platform {
env: {
DB: D1Database;
KV: KVNamespace;
DOCS: R2Bucket;
};
context: {
waitUntil(promise: Promise<any>): void;
};
caches: CacheStorage & { default: Cache };
cf?: IncomingRequestCfProperties;
}
}
namespace Lucia {
type Auth = import("$lib/server/lucia").Auth;
type DatabaseUserAttributes = {
// ...
};
type DatabaseSessionAttributes = {};
}
}
export {};
When I build and attempt to deploy the build it says the event.platform
is undefined:
12:52:36.928 > Using @sveltejs/adapter-cloudflare
12:52:38.216 TypeError: Cannot read properties of undefined (reading 'env')
12:52:38.216 at Object.handle (file:///opt/buildhome/repo/.svelte-kit/output/server/chunks/hooks.server.js:34:42)
...
Deployment ID - 55b93723-6495-4000-bfb4-f3e971753c60
I have search Google for an answer to my problem, but I haven't been able to find anyone else who is having the same problem with platform being undefined in a SvelteKit hooks.server.ts
file. I have added the DB
, KV
and DOCS
bindings from the workers dashboard, however I don't think that is the problem as well, because the error shows that the event.platform
variable is undefined.
Hopefully I have enough information in this post. Any help is appreciated!nykloon
11/04/2023, 12:57 PMX
and Y
, and my intention is to host both under the same domain, such as your.domain.com
. The structure I'm aiming for is to have repository X
accessible at your.domain.com/previews/X
and repository Y
at your.domain.com/previews/Y
.
Does Cloudflare Pages support this type of configuration?
Thanks in advance.Muhymin
11/09/2023, 1:41 PMwrangler pages deployment tail
commands but they aren't working. Starting any of them makes the entire website inaccessible. If someone visits the deployment, they see the Error 1101 Worker threw exception
page. And the 1101
error page doesn't go away even after disabling the tails. Cloudflare doesn't output any useful error also, the error is simply Error: internal error
.
I need to tail the deployments to debug an issue but this bug isn't letting me use the tailing functionality.egemenozkan
11/12/2023, 10:58 AMh4rl
12/01/2023, 9:08 PMRico.
12/10/2023, 12:16 PM13:12:45.488 12:12:45 ▶ /_astro/tenhult_lake_1Bgy5U.webp (before: 303kB, after: 6kB) (+223ms) (107/263)
13:12:45.858 Segmentation fault
13:12:45.871 Failed: Error while executing user command. Exited with error code: 139
13:12:45.881 Failed: build command exited with code: 1
13:12:46.807 Failed: error occurred while running build command
ramandrem
12/13/2023, 2:27 AMShowierData9978 (reply ping pls)
12/14/2023, 5:38 AMmrnooli
12/14/2023, 4:02 PMdavidaae
12/15/2023, 6:59 PMalexander9602
12/16/2023, 1:18 PMturck
12/17/2023, 12:46 AMbranchverse
12/17/2023, 8:23 PMlunarings
12/18/2023, 6:55 AMpython manage.py runserver
, but the thing is i have 0 clue on how to execute this and i need help with it.Merwllyra
12/18/2023, 7:29 PM--continue
or anything. Running the command again takes forever, and then there are other issues, and ...
I really hoped I can kick off a quick SvelteKit project on Cloudflare, man! I really believed it would be super easy. Come on!Ben-xD
12/18/2023, 9:31 PMdeanmauro
12/18/2023, 10:13 PMnext export
and uploaded to CF pages.
I've added a \_redirects file with
/:org/service_/* /:splat 200
to mimic Next.js rewrites (e.g. user goes to /123/service_/contact-us
and lands on the /contact-us
page.
The rewriting is successfully happening. I get to the right page and see the right URL in the address bar. BUT all navigation causes a full re-render of the page, common elements included. Is there a way to do Next.js-style rewrites without causing full-page re-renders on every route change?