kit: adapter-vercel seems to be broken at @sveltejs/kit@1.0.0-next.292
Describe the bug
Vercel builds seem to be broken by #4192 since adapter-vercel still uses builder.prerender
.
Reproduction
Run npm run build
to see error.
Logs
At the end of build...
> Using @sveltejs/adapter-vercel
> builder.prerender() has been removed. Prerendering now takes place in the build phase — see builder.prerender and builder.writePrerendered
at Object.prerender (file:///home/projects/sveltejs-kit-template-default-ansvrj/node_modules/@sveltejs/kit/dist/chunks/index4.js:183:10)
at adapt (file:///home/projects/sveltejs-kit-template-default-ansvrj/node_modules/@sveltejs/adapter-vercel/index.js:116:38)
at adapt (file:///home/projects/sveltejs-kit-template-default-ansvrj/node_modules/@sveltejs/kit/dist/chunks/index4.js:202:8)
at eval (file:///home/projects/sveltejs-kit-template-default-ansvrj/node_modules/@sveltejs/kit/dist/cli.js:956:11)
System Info
Default node.new/sveltekit env. Left the command above running for ~5min and got no response.
Severity
blocking an upgrade
Additional Information
Blocks upgrade to @sveltejs/kit@1.0.0-next.292
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 19
- Comments: 23 (7 by maintainers)
Commits related to this issue
- build: adjust for SvelteKit changes See: https://github.com/sveltejs/kit/issues/4224#issuecomment-1059881253 — committed to nachtjasmin/corona-noergel-app by nachtjasmin 2 years ago
- build: adjust for SvelteKit changes See: https://github.com/sveltejs/kit/issues/4224#issuecomment-1059881253 — committed to nachtjasmin/corona-noergel-app by nachtjasmin 2 years ago
- did this https://github.com/sveltejs/kit/issues/4224#issuecomment-1059741336 — committed to ONSvisual/scrolly_AML_robo_animation_svelteKit by incontrolapps 2 years ago
- Update svelte-kit to 1.0.0-next.292 Also, update adapter-static to 1.0.0-next.29, following the instructions from https://github.com/sveltejs/kit/issues/4224#issuecomment-1059881253 and setting kit.p... — committed to jwpconsulting/projectify-frontend by justuswilhelm 2 years ago
- Update svelte-kit to 1.0.0-next.292 Also, update adapter-static to 1.0.0-next.29, following the instructions from https://github.com/sveltejs/kit/issues/4224#issuecomment-1059881253 and setting kit.p... — committed to jwpconsulting/projectify-frontend by justuswilhelm 2 years ago
- Update svelte-kit to 1.0.0-next.292 Also, update adapter-static to 1.0.0-next.29, following the instructions from https://github.com/sveltejs/kit/issues/4224#issuecomment-1059881253 and setting kit.p... — committed to jwpconsulting/projectify-frontend by justuswilhelm 2 years ago
The solution from me turns back or use the previous version that
1.0.0-next.288
or1.0.0-next.291
. you can try :"@sveltejs/kit": "next",
to be"@sveltejs/kit": "1.0.0-next.291",
atpackage.json
."prepare": "svelte-kit sync"
atpackage.json
(if any there).npm install
Thanks
Just going to note that this appears to impact more than just vercel. I’m attempting to build with the static-adapter and running into the same error message.
yes, same for
adapter-node
Now we can install
@sveltejs/adapter-static@1.0.0-next.29
and other latest adapters!@sveltejs/kit@1.0.0-next.291
is also okay. Hope to fix Thank you @faisalramdan17 for information.The build is broken. The release of adapter-static 29 is coming.
After much trial and error here are some settings that work:
Sometimes destructive change occur because kit is under beta. And adapters may be updated at the same time accordingly. This means that the kit and adapters is only work with certain version combinations. So when you update kit version, I recommend that adapter version also should update as well.
This problem was opened when release timing between kit and adapters was off by several hours. And it was fixed few hours later and this issue is now closed.
If you have a problem now, you need to open a new issue.
It looks like #4192 didn’t include the appropriate changesets for any of the adapters, and so they weren’t actually released.
Confirmed that this issue also affects
@sveltejs/adapter-netlify
. Rolling back to @sveltejs/kit@1.0.0-next.291 is a working workaround.Ran into the same problem yesterday with adapter-node and had to downgrade to 288.