-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
feat: enable user profile embed on external site #9851
base: main
Are you sure you want to change the base?
Conversation
* feat: add `@vercel/og` package * feat: boilerplate embed endpoint on `edge` runtime * feat: integrate `embed` endpoint into `[username]` route SSR * feat: add `satori`; remove `@vercel/og` package * feat: add embed `Profile` component * feat: integrate embed `Profile` with `satori` in `embed` endpoint * chore: move `Youtube` to `embeds/internal` dir * feat: boilerplate embed url on user profile * fix: nits * feat: add `twemoji` util function * feat: implement `twemoji` in `loadAdditiionalAsset` prop * feat: add embed url field to profile share modal * chore: modify theme fallback value * fix(build): generate new `package-lock` * Update components/embeds/external/Profile.js * refactor: merge repeated part in components/user/UserProfile.js Suggestion by @a0m0rajab Co-authored-by: Abdurrahman Rajab <[email protected]> * fix: remove redundant return --------- Co-authored-by: Eddie Jaoude <[email protected]> Co-authored-by: Abdurrahman Rajab <[email protected]>
Having some challenges with the middleware and custom domains (deployed to Preview environment https://biodrop-preview.vercel.app/api/profiles/eddiejaoude/embed?theme=default)
⨯ [Error: ENOENT: no such file or directory, open '/home/runner/work/BioDrop/BioDrop/public/Inter-Regular.ttf'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/home/runner/work/BioDrop/BioDrop/public/Inter-Regular.ttf'
}
⨯ MissingStaticPage [Error]: Failed to load static file for page: /en/500 ENOENT: no such file or directory, open '/var/task/.next/server/pages/en/500.html'
at /var/task/node_modules/next/dist/server/require.js:102:19
at async loadComponentsImpl (/var/task/node_modules/next/dist/server/load-components.js:59:26)
at async NextNodeServer.findPageComponentsImpl (/var/task/node_modules/next/dist/server/next-server.js:669:36)
at async NextNodeServer.renderErrorToResponseImpl (/var/task/node_modules/next/dist/server/base-server.js:2042:30)
at async pipe.req.req (/var/task/node_modules/next/dist/server/base-server.js:1982:30)
at async NextNodeServer.pipeImpl (/var/task/node_modules/next/dist/server/base-server.js:902:25)
at async NextNodeServer.handleCatchallRenderRequest (/var/task/node_modules/next/dist/server/next-server.js:281:21)
at async NextNodeServer.runImpl (/var/task/node_modules/next/dist/server/base-server.js:887:9)
at async NextNodeServer.handleRequestImpl (/var/task/node_modules/next/dist/server/base-server.js:824:20)
[Error: ENOENT: no such file or directory, open '/home/runner/work/BioDrop/BioDrop/public/Inter-Regular.ttf'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/home/runner/work/BioDrop/BioDrop/public/Inter-Regular.ttf'
}
Error: Runtime exited with error: exit status 1
Runtime.ExitError |
const inter = await fs.readFile( | ||
path.resolve( | ||
path.dirname(fileURLToPath(import.meta.url)), | ||
"../../../../public", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fonts not found
In regards to the file not being found, I want to assume it due to the variation in environments folder location once the next build down for production.
I think we can stick to our current scope.... This path.dirname(fileURLToPath(import.meta.url))
resolves to our current file location, maybe we can just move the font folder into thesame location where this file lives... that way we can do away ../../../../public
which might seem unpredictable to using fonts
in its place as second args,
So the new set up can look like
api/profiles/[username]
- embed.js
fonts
- Inter-Regular.ttf
- Inter-Bold.ttf
I will try look into this sometime too! Yo @a0m0rajab, get in here 😉 |
Thanks! @babblebey sure will check this next week or the week after, I feel like to finish this https://github.com/open-sauced/ai/issues/291first then jump to this project, or I might have a one extended day for coding to try this lol. |
Hey @eddiejaoude, found this is still pending 🫣. I cannot exactly reproduce the error you're experiencing. Let's pair on this sometime and work with the preview environment when you're free. This feature should be shipped already 😉 |
Fixes Issue
closes #9100
Deploying PR to Preview environment #9500
Changes proposed
Check List (Check all the applicable boxes)
Screenshots
Note to reviewers