Skip to content

pages-plugin-vercel-og not working with sveltekit when we import ImageResponse from @cloudflare/pages-plugin-vercel-og/api #36

@theetherGit

Description

@theetherGit

When we use ImageResponse from @cloudflare/pages-plugin-vercel-og/api it's not gonna copy the required files in correct folder.

Error: ENOENT: no such file or directory, open '/Users/shivammeena/WebstormProjects/svelte-h2j/example/cf-pages/.svelte-kit/output/server/chunks/noto-sans-v27-latin-regular.ttf'
    at Object.openSync (node:fs:600:3)
    at Object.readFileSync (node:fs:468:35)
    at file:///Users/shivammeena/WebstormProjects/svelte-h2j/example/cf-pages/.svelte-kit/output/server/chunks/index.node.js:39451:21
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
    at async analyse (file:///Users/shivammeena/WebstormProjects/svelte-h2j/example/cf-pages/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@sveltejs/kit/src/core/postbuild/analyse.js:83:16)
    at async MessagePort.<anonymous> (file:///Users/shivammeena/WebstormProjects/svelte-h2j/example/cf-pages/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@sveltejs/kit/src/utils/fork.js:22:16)
Emitted 'error' event on Worker instance at:
    at [kOnErrorMessage] (node:internal/worker:290:10)
    at [kOnMessage] (node:internal/worker:301:37)
    at MessagePort.<anonymous> (node:internal/worker:202:57)
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:731:20)
    at exports.emitMessage (node:internal/per_context/messageport:23:28) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/Users/shivammeena/WebstormProjects/svelte-h2j/example/cf-pages/.svelte-kit/output/server/chunks/noto-sans-v27-latin-regular.ttf'
}

Node.js v18.12.1

Steps to reproduce

  1. Clone https://github.com/etherCorps/svelte-h2j and use example branch
  2. In project you will find the example directory which contains cf-pages which is the project where i used @cloudflare/pages-plugin-vercel-og/api.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions