Skip to content

builder.writePrerendered is not a function #4259

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

Closed
necmettin opened this issue Mar 6, 2022 · 1 comment
Closed

builder.writePrerendered is not a function #4259

necmettin opened this issue Mar 6, 2022 · 1 comment

Comments

@necmettin
Copy link

Describe the bug

I am trying to create a self-contained node app with npm run build, as described in https://kit.svelte.dev/docs/adapters#supported-environments-node-js, but after vite v2.8.6 builds SSR bundle for production, I get this:

Run npm run preview to preview your production build locally.

> Using @sveltejs/adapter-node
> builder.writePrerendered is not a function
    at adapt (file:///home/t4/website/client/panel/node_modules/@sveltejs/adapter-node/index.js:37:12)
    at adapt (file:///home/t4/website/client/panel/node_modules/@sveltejs/kit/dist/chunks/index4.js:887:8)
    at file:///home/t4/website/client/panel/node_modules/@sveltejs/kit/dist/cli.js:1060:11

I have not modified the build command or the node adapter in any way.

Reproduction

I am unable to share code. I will try with an empty SvelteKit repository but after seeing #4224, I thought this might be related/known.

Logs

No response

System Info

System:
    OS: Linux 5.13 Ubuntu 20.04.4 LTS (Focal Fossa)
    CPU: (1) x64 Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
    Memory: 349.17 MB / 908.55 MB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 16.14.0 - /usr/bin/node
    npm: 8.3.1 - /usr/bin/npm
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.30
    @sveltejs/adapter-node: ^1.0.0-next.71 => 1.0.0-next.71
    @sveltejs/kit: next => 1.0.0-next.291
    svelte: ^3.44.0 => 3.46.4

Severity

blocking all usage of SvelteKit

Additional Information

I am unable to proceed and couldn't find any reference to this issue anywhere.

@Rich-Harris
Copy link
Member

Your @sveltejs/kit is out of date:

npm i -D @sveltejs/kit@next

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

No branches or pull requests

2 participants