RiadhAdrani / slick-portfolio-svelte

Vercel-like style portfolio template for developers.
https://riadhadrani.github.io/slick-portfolio-svelte/
203 stars 105 forks source link

Resume: ERROR - NotFound #28

Closed Srm-Akla closed 8 months ago

Srm-Akla commented 8 months ago

Hey, I am getting the following error using npm build. I have added the file path in params.ts, and it works with npm run dev, but npm build doesnt work. I do not understand why the file cannot be found eventhough its in the correct directory.

NotFound [Error]: Not found: /srm-akla.github.io/src/lib/md/CV_english_2024.pdf
    at resolve2 (file:///home/zippidybop/Projects/srm-akla.github.io/.svelte-kit/output/server/index.js:2896:18)
    at resolve (file:///home/zippidybop/Projects/srm-akla.github.io/.svelte-kit/output/server/index.js:2723:34)
    at #options.hooks.handle (file:///home/zippidybop/Projects/srm-akla.github.io/.svelte-kit/output/server/index.js:2962:71)
    at respond (file:///home/zippidybop/Projects/srm-akla.github.io/.svelte-kit/output/server/index.js:2721:43) {
  status: 404
}

node:internal/event_target:1096
  process.nextTick(() => { throw err; });
                           ^
Error: 404 /srm-akla.github.io/src/lib/md/CV_english_2024.pdf (linked from /srm-akla.github.io/resume)
To suppress or handle this error, implement `handleHttpError` in https://kit.svelte.dev/docs/configuration#prerender
    at file:///home/zippidybop/Projects/srm-akla.github.io/node_modules/@sveltejs/kit/src/core/config/options.js:212:13
    at file:///home/zippidybop/Projects/srm-akla.github.io/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:64:25
    at save (file:///home/zippidybop/Projects/srm-akla.github.io/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:403:4)
    at visit (file:///home/zippidybop/Projects/srm-akla.github.io/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:236:3)

Thanks!

RiadhAdrani commented 8 months ago

Hello, move the file to the static folder and change this line to be item:'CV_english_2024.pdf'.

Srm-Akla commented 8 months ago

It works! Thanks!