yarbsemaj / sveltekit-adapter-lambda

An adapter to build a SvelteKit app into a lambda ready for deployment with lambda proxy via the Serverless Framework or CDK.
https://www.npmjs.com/package/@yarbsemaj/adapter-lambda
MIT License
77 stars 16 forks source link

no such file or directory, scandir 'build/prerendered' #5

Closed scurrilus-funke closed 2 years ago

scurrilus-funke commented 2 years ago

Hi, thank you for this solution.

i was running into a problem were build process displays an error.

ENOENT: no such file or directory, scandir 'build/prerendered'

it came from @yarbsemaj/adapter-lambda/index.js const prerendered_directory = join(out, 'prerendered');

The solution was to add export const prerender = true; to one of my pages. For example index.svelte https://kit.svelte.dev/docs/page-options#prerender. The prerender folder is missing if i don`t do that. This is why the build fails.

Is it possible to make this voluntarily in a future Version of this adapter?

Many Thanks and happy coding Cheers Peter

yarbsemaj commented 2 years ago

Hi @scurrilus-funke, thank you for your interest in my project.

Thankyou, for spotting this bug, iv just published a new version, 0.4.2, that I believe should fix the issue you described.

Please let me know of this fixes your issue and I will mark it as resolved

scurrilus-funke commented 2 years ago

Perfect it works! Thank you.