Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bun incompatibility #112

Open
nathanchase opened this issue Nov 16, 2023 · 3 comments
Open

Bun incompatibility #112

nathanchase opened this issue Nov 16, 2023 · 3 comments
Labels

Comments

@nathanchase
Copy link

nathanchase commented Nov 16, 2023

Describe the bug

Works great running nuxi dev locally.

On production, the URL is populated correctly:
<meta property="og:image" content="https://www.mydomain.com/sharepage/__og_image__/og.png">

but if I go to that URL directly, I get a 500 error:

[nuxt] error caught during app initialization Error: Page not found: /sharepage/__og_image__/og.png
    at Gi (entry.acb9a3ca.js:1:119961)
    at entry.acb9a3ca.js:13:9639
    at r (entry.acb9a3ca.js:1:95258)
    at Object.runWithContext (entry.acb9a3ca.js:1:39867)
    at by (entry.acb9a3ca.js:1:95288)
    at entry.acb9a3ca.js:1:93934
    at Cu.run (entry.acb9a3ca.js:1:3586)
    at Object.runWithContext (entry.acb9a3ca.js:1:93926)
    at entry.acb9a3ca.js:13:9617
    at entry.acb9a3ca.js:5:20672
entry.acb9a3ca.js:14 Failed to create og image: undefined is not an object (evaluating 't.type')

My nuxt.config:

site: {
  url: import.meta.env.NUXT_PUBLIC_SITE_URL || 'https://www.mydomain.com'
},
ogImage: {
  runtimeSatori: true,
},

Reproduction

https://stackblitz.com/edit/github-r8fu9x?file=components%2FOgImage.vue

System / Nuxt Info

------------------------------
- Operating System: Linux
- Node Version:     v20.9.0
- Nuxt Version:     3.8.1
- CLI Version:      3.9.0-1694773088.8039b88
- Nitro Version:    2.7.2
- Package Manager:  [email protected]
- Builder:          -
- User Config:      telemetry, devtools, modules, schemaOrg, nitro, vue, ogImage, image, experimental, routeRules, pwa, hooks, postcss, site, runtimeConfig, typescript, imports, router, vite
- Runtime Modules:  @pinia/[email protected], @pinia-plugin-persistedstate/[email protected], @vite-pwa/[email protected], @vueuse/[email protected], @nuxt/[email protected], @nuxtjs/[email protected], @nuxtjs/[email protected], floating-vue/nuxt, [email protected], [email protected]
------------------------------
@nathanchase
Copy link
Author

Here's a reproduction of what I'm trying to accomplish:
https://stackblitz.com/edit/github-r8fu9x?file=components%2FOgImage.vue

It's pulling two images, processing them using Nuxt Image, and then creating the component template for defineOgImage.

@nathanchase
Copy link
Author

Found the culprit - it seems like nuxt-og-image (and Santori, at least) is not currently compatible with Bun. As soon as I switched to just regular Node 20, it works. Feel free to close this if you like, but know that Bun compatibility is the bigger issue.

@harlan-zw harlan-zw changed the title Failed to create og image: undefined is not an object (evaluating 't.type') Bun incompatibility Nov 25, 2023
@harlan-zw
Copy link
Collaborator

Thanks, I'll test out the v3 release with Bun when I get to that. It's likely it's related to some WASM behavior but if it's on my end I can fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants