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
If the title of a post contains a colon(:), src/pages/[ogTitle].svg.ts and then src/utils/generateOgImage.tsx fails on npm run build with src/utils/generateOgImage.tsx
#88
Closed
mofrisch opened this issue
Jul 9, 2023
· 1 comment
Minimal not working example:
Make a post with title: "Finally: My first blog post".
set ogImage: ""
npm run build
λ src/pages/[ogTitle].svg.ts
Output PNG Image : Adding new posts in AstroPaper theme.png
├─ /Adding new posts in AstroPaper theme.svg (+203ms)
Output PNG Image : Finally: My first blog post.png
error The URL must be of scheme file
File:
/Users/mo/dev/moritz-blogs/node_modules/astro/dist/core/build/generate.js:493:21
Code:
492 | await fs.promises.mkdir(outFolder, { recursive: true });
> 493 | await fs.promises.writeFile(outFile, body, encoding ?? "utf-8");
| ^
494 | }
495 | export {
496 | chunkIsPage,
Stacktrace:
TypeError: The URL must be of scheme file
at open (node:internal/fs/promises:591:10)
at Object.writeFile (node:internal/fs/promises:1017:20)
at generatePath (file:///Users/mo/dev/moritz-blogs/node_modules/astro/dist/core/build/generate.js:493:21)
at async generatePage (file:///Users/mo/dev/moritz-blogs/node_modules/astro/dist/core/build/generate.js:193:5)
at async generatePages (file:///Users/mo/dev/moritz-blogs/node_modules/astro/dist/core/build/generate.js:118:7)
at async staticBuild (file:///Users/mo/dev/moritz-blogs/node_modules/astro/dist/core/build/static-build.js:85:7)
at async AstroBuilder.build (file:///Users/mo/dev/moritz-blogs/node_modules/astro/dist/core/build/index.js:124:5)
at async AstroBuilder.run (file:///Users/mo/dev/moritz-blogs/node_modules/astro/dist/core/build/index.js:156:7)
at async build (file:///Users/mo/dev/moritz-blogs/node_modules/astro/dist/core/build/index.js:37:3)
at async runCommand (file:///Users/mo/dev/moritz-blogs/node_modules/astro/dist/cli/index.js:171:14)
at async cli (file:///Users/mo/dev/moritz-blogs/node_modules/astro/dist/cli/index.js:213:5)
The text was updated successfully, but these errors were encountered:
Minimal not working example:
Make a post with title: "Finally: My first blog post".
set ogImage: ""
npm run build
λ src/pages/[ogTitle].svg.ts
Output PNG Image : Adding new posts in AstroPaper theme.png
├─ /Adding new posts in AstroPaper theme.svg (+203ms)
Output PNG Image : Finally: My first blog post.png
error The URL must be of scheme file
File:
/Users/mo/dev/moritz-blogs/node_modules/astro/dist/core/build/generate.js:493:21
Code:
492 | await fs.promises.mkdir(outFolder, { recursive: true });
> 493 | await fs.promises.writeFile(outFile, body, encoding ?? "utf-8");
| ^
494 | }
495 | export {
496 | chunkIsPage,
Stacktrace:
TypeError: The URL must be of scheme file
at open (node:internal/fs/promises:591:10)
at Object.writeFile (node:internal/fs/promises:1017:20)
at generatePath (file:///Users/mo/dev/moritz-blogs/node_modules/astro/dist/core/build/generate.js:493:21)
at async generatePage (file:///Users/mo/dev/moritz-blogs/node_modules/astro/dist/core/build/generate.js:193:5)
at async generatePages (file:///Users/mo/dev/moritz-blogs/node_modules/astro/dist/core/build/generate.js:118:7)
at async staticBuild (file:///Users/mo/dev/moritz-blogs/node_modules/astro/dist/core/build/static-build.js:85:7)
at async AstroBuilder.build (file:///Users/mo/dev/moritz-blogs/node_modules/astro/dist/core/build/index.js:124:5)
at async AstroBuilder.run (file:///Users/mo/dev/moritz-blogs/node_modules/astro/dist/core/build/index.js:156:7)
at async build (file:///Users/mo/dev/moritz-blogs/node_modules/astro/dist/core/build/index.js:37:3)
at async runCommand (file:///Users/mo/dev/moritz-blogs/node_modules/astro/dist/cli/index.js:171:14)
at async cli (file:///Users/mo/dev/moritz-blogs/node_modules/astro/dist/cli/index.js:213:5)
The text was updated successfully, but these errors were encountered: