Closed callumgare closed 2 years ago
Ah yeah, I know what this is about. Since #4588, SvelteKit depends on two new dependencies, cookie
and set-cookie-parser
. When running kit.svelte.dev locally, it copies over the src
files in the kit
package rather than the built asset
files since that makes development easier, but for reasons I don't yet totally understand, that means Vite can't find those dependencies when you do svelte-kit build
.
The easy fix is to add cookie
and set-cookie-parser
as devDependencies of kit.svelte.dev (we already do this for another dependency, devalue
). But it doesn't feel like a very correct or scalable solution. Need to figure out why those dependencies aren't getting bundled. It applies to other parts of the repo as well (the adapter-static
package has a devDependency on devalue
for the same reason, as does kit-sandbox.
A temporary workaround is to do CI=true pnpm build
instead of pnpm build
, since in CI kit.svelte.dev uses the built files rather than the src
files.
Cool beans, to be honest I only really cared about building it to verify this PR https://github.com/sveltejs/kit/pull/4643. I'll leave this issue for you to do with what you will and close when you're happy with it :)
Just tuning in here. I just ran into this issue, `import cookie from 'cookie'
Whoops sent that one early.
Is no one else still hitting this issue?
Describe the bug
Following the instructions on https://github.com/sveltejs/kit/blob/master/CONTRIBUTING.md exactly I get the following error:
Reproduction
I have literally just done the steps in https://github.com/sveltejs/kit/blob/master/CONTRIBUTING.md (deleting everything and trying again several times):
Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information
No response