You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When importing the @vercel/og module, an error occurs during the module's initialization in a GitHub Actions environment. The error appears to be related to converting a file path to a URL for the bundled font file (noto-sans-v27-latin-regular.ttf). This issue does not occur on my Japanese Windows machine but consistently reproduces on GitHub Actions using various Node.js versions (e.g., lts/-1, lts/*, latest).
The error log includes the following message:
TypeError: Invalid URL
at new URL (node:internal/url:806:29)
at fileURLToPath (node:internal/url:1485:12)
at file:///D:/a/satiri-test/satiri-test/node_modules/@vercel/og/dist/index.node.js:18929:32
...
input: '.\\file:\\D:\\a\\satiri-test\\satiri-test\\node_modules\\@vercel/og\\dist\\noto-sans-v27-latin-regular.ttf'
Expected Behavior
I expect @vercel/og to correctly resolve and load its assets (like fonts) without errors, regardless of the environment. The module should work seamlessly both locally and in CI environments such as GitHub Actions.
Reproduction
The issue can be reproduced with the following code:
Environment: The issue occurs in GitHub Actions (CI), while it does not on my local Japanese Windows environment.
Additional Note: There is an experimental warning related to the --experimental-loader flag, and the error seems to be triggered during the import stage when resolving the font file URL.
The text was updated successfully, but these errors were encountered:
Bug report
Description / Observed Behavior
When importing the
@vercel/og
module, an error occurs during the module's initialization in a GitHub Actions environment. The error appears to be related to converting a file path to a URL for the bundled font file (noto-sans-v27-latin-regular.ttf
). This issue does not occur on my Japanese Windows machine but consistently reproduces on GitHub Actions using various Node.js versions (e.g.,lts/-1
,lts/*
,latest
).The error log includes the following message:
Expected Behavior
I expect
@vercel/og
to correctly resolve and load its assets (like fonts) without errors, regardless of the environment. The module should work seamlessly both locally and in CI environments such as GitHub Actions.Reproduction
The issue can be reproduced with the following code:
To reproduce:
or
Additional Context
--experimental-loader
flag, and the error seems to be triggered during the import stage when resolving the font file URL.The text was updated successfully, but these errors were encountered: