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
I'm building a blog with sveltekit, and mdsvex didn't grow on me, so I'm implementing my Markdown handling on my own. All markdown files are located in content/posts, which will be loaded via data/posts/api.server.ts. This gets initially loaded in the base +layout.server.ts, the data is then accessed in routes/posts/[slug]/+page.server.ts. Finally, display the data in routes/posts/[slug]/Entry.svelte.
This works locally running npm run dev, which before this change also wasn't working. As the error log references files like /_app/immutable/assets/copy_path_terminal-e7dd46f9.gif (I also get this error message for .png) which have a unique id appended to the original file name, I assume that the import works. I don't see the files in .svelte-kit/output/client/_app/immutable/assets - there are only the CSS files.
❯ npm run build
>[email protected] build
> vite build
vite v4.0.4 building for production...
transforming (39) node_modules/devalue/src/stringify.js23:04:39
<<REMOVED UNUSED CSS LOGS>>✓ 370 modules transformed.23:04:40 [vite-plugin-svelte] dom compile done.package files time avgharambasic.de 10 0.22s 21.9msvite v4.0.4 building SSR bundle for production...transforming (36) node_modules/@sveltejs/kit/src/runtime/client/utils.js<<REMOVED UNUSED CSS LOGS>>✓ 88 modules transformed.23:04:40 [vite-plugin-svelte] ssr compile done.package files time avgharambasic.de 9 37.0ms 4.1ms@sveltejs/kit 1 2.6ms 2.6ms.svelte-kit/output/server/vite-manifest.json 3.85 kB.svelte-kit/output/server/entries/pages/_page.ts.js 0.05 kB.svelte-kit/output/server/entries/pages/posts/_page.server.ts.js 0.08 kB.svelte-kit/output/server/internal.js 0.14 kB.svelte-kit/output/server/entries/pages/_page.svelte.js 0.22 kB.svelte-kit/output/server/entries/pages/posts/_slug_/_page.server.ts.js 0.28 kB.svelte-kit/output/server/entries/pages/_layout.svelte.js 0.30 kB.svelte-kit/output/server/entries/fallbacks/error.svelte.js 0.83 kB.svelte-kit/output/server/chunks/index.js 3.68 kB.svelte-kit/output/server/chunks/helper.js 3.77 kB.svelte-kit/output/server/chunks/server-internal.js 3.93 kB.svelte-kit/output/server/entries/pages/_layout.server.ts.js 6.09 kB.svelte-kit/output/server/entries/pages/posts/_slug_/_page.svelte.js 6.27 kB.svelte-kit/output/server/entries/pages/posts/_page.svelte.js 9.48 kB.svelte-kit/output/server/index.js 78.63 kBError: Not found: /_app/immutable/assets/copy_path_terminal-e7dd46f9.gif at resolve (file:///Users/luha/Development/harambasic.de/.svelte-kit/output/server/index.js:2493:18) at resolve (file:///Users/luha/Development/harambasic.de/.svelte-kit/output/server/index.js:2358:34) at Object.#options.hooks.handle (file:///Users/luha/Development/harambasic.de/.svelte-kit/output/server/index.js:2537:59) at respond (file:///Users/luha/Development/harambasic.de/.svelte-kit/output/server/index.js:2356:43)file:///Users/luha/Development/harambasic.de/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:27 throw new Error(format(details)); ^Error: 404 /_app/immutable/assets/copy_path_terminal-e7dd46f9.gif (linked from /posts/quickly-copying-paths-to-the-terminal-on-macos) at file:///Users/luha/Development/harambasic.de/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:27:11 at save (file:///Users/luha/Development/harambasic.de/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:346:4) at visit (file:///Users/luha/Development/harambasic.de/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:195:3)[vite-plugin-sveltekit-compile] Prerendering failed with code 1error during build:Error: Prerendering failed with code 1 at ChildProcess.<anonymous> (file:///Users/luha/Development/harambasic.de/node_modules/@sveltejs/kit/src/exports/vite/index.js:599:15) at ChildProcess.emit (node:events:527:28) at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
I don't know if the problem is SveleKit, Vite, or the unified plugin, but as there was an issue with the adapters I thought I'll start here with my problem. Let me know if you need additional information.
Cheers,
Luka
The text was updated successfully, but these errors were encountered:
Describe the bug
Problem
I'm building a blog with sveltekit, and mdsvex didn't grow on me, so I'm implementing my Markdown handling on my own. All markdown files are located in
content/posts
, which will be loaded viadata/posts/api.server.ts
. This gets initially loaded in the base+layout.server.ts
, the data is then accessed inroutes/posts/[slug]/+page.server.ts
. Finally, display the data inroutes/posts/[slug]/Entry.svelte
.To import the images to be processed via vite I use a custom unified plugin to import the files (inspired by this implementation).
This works locally running
npm run dev
, which before this change also wasn't working. As the error log references files like/_app/immutable/assets/copy_path_terminal-e7dd46f9.gif
(I also get this error message for .png) which have a unique id appended to the original file name, I assume that the import works. I don't see the files in.svelte-kit/output/client/_app/immutable/assets
- there are only the CSS files.What have I tried?
Reproduction
I can't provide it as Stackblitz doesn't allow images to be uploaded, and this issue is about failing image imports. Happy to provide you a better reproduction if you let me know how.
https://github.com/LukaHarambasic/harambasic.de/tree/v3-sveltekit-reproduction-failing-build-imageswith
Logs
System Info
Severity
blocking all usage of SvelteKit
Additional Information
I don't know if the problem is SveleKit, Vite, or the unified plugin, but as there was an issue with the adapters I thought I'll start here with my problem. Let me know if you need additional information.
Cheers,
Luka
The text was updated successfully, but these errors were encountered: