Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: builder.copy is not a function while building with adapter-vercel #630

Merged
merged 1 commit into from
Mar 24, 2021

Conversation

chrsep
Copy link
Contributor

@chrsep chrsep commented Mar 24, 2021

Hi, I noticed that the builder.copy line was replacing a line that calls the copy function in @sveltejs/app-utils/files. I found that the same function is now exported by @sveltejs/kit/filesystem. So I tried replacing builder.copy with the copy function from @sveltejs/kit/filesystem.

I've tested this on the realworld.svelte.dev example project by temporarily replacing its adapter-node with adapter-vercel and it seems to be working.

Fixes #617.

@chrsep chrsep changed the title fix: builder.copy is not a function fix: builder.copy is not a function while building with adapter-vercel Mar 24, 2021
Copy link
Member

@antony antony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, but this isn't the correct fix. We should be adding copy to the builder function.

See Builder.js where we add rimraf etc :)

Add @sveltejs/kit/filesystem copy function to builder.
@chrsep
Copy link
Contributor Author

chrsep commented Mar 24, 2021

Hi @antony, I've updated the PR and added the copy function to the builder function and builder.copy now works.

@antony antony merged commit 924db15 into sveltejs:master Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

adapter-vercel build fails with TypeError: builder.copy is not a function
3 participants