adapter-static error: config.kit.adapter should be an object with an "adapt" method
See original GitHub issueDescribe the bug Just spun up a project following the docs. I installed the static adapter and tried to modify svelte.config.cjs to use the static adapter but the server wont spin up. App otherwise runs with the node adapter.
Logs
> sveltekit-first-look@0.0.1 dev
> svelte-kit dev "--open"
config.kit.adapter should be an object with an "adapt" method. See https://kit.svelte.dev/docs#adapters
Error: config.kit.adapter should be an object with an "adapt" method. See https://kit.svelte.dev/docs#adapters
at Object.validate (file:///Users/stordahl/Code/sveltekit-first-look/node_modules/@sveltejs/kit/dist/cli.js:162:13)
at validate (file:///Users/stordahl/Code/sveltekit-first-look/node_modules/@sveltejs/kit/dist/cli.js:341:28)
at validate (file:///Users/stordahl/Code/sveltekit-first-look/node_modules/@sveltejs/kit/dist/cli.js:339:19)
at validate_config (file:///Users/stordahl/Code/sveltekit-first-look/node_modules/@sveltejs/kit/dist/cli.js:402:20)
at load_config (file:///Users/stordahl/Code/sveltekit-first-look/node_modules/@sveltejs/kit/dist/cli.js:381:20)
at async get_config (file:///Users/stordahl/Code/sveltekit-first-look/node_modules/@sveltejs/kit/dist/cli.js:431:10)
at async file:///Users/stordahl/Code/sveltekit-first-look/node_modules/@sveltejs/kit/dist/cli.js:474:18
To Reproduce I have made sure all pkgs are up to date. Project is in remote here
Expected behavior Just expecting the server to spin up with the static-adapter installed
Stacktraces
If you have a stack trace to include, we recommend putting inside a <details>
block for the sake of the thread’s readability:
Stack trace
Stack trace goes here…
Information about your SvelteKit Installation:
System:
OS: macOS 10.15.7
CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Memory: 56.84 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 15.11.0 - /usr/local/bin/node
npm: 7.6.0 - /usr/local/bin/npm
Browsers:
Chrome: 89.0.4389.90
Firefox Developer Edition: 87.0
Safari: 13.1.3
npmPackages:
@sveltejs/kit: next => 1.0.0-next.58
svelte: ^3.29.0 => 3.35.0
-
Firefox Dev Edition 87.0b9 (64-bit)
-
Static adapter
Severity Not severe, just trying to test SvelteKit out in static mode.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
config.kit.adapter should be an object with an "adapt" method
I installed the adapter static with npm i @sveltejs/adapter-static. The code in the svelte.config.cjs looks like this kit: { // By default, `npm ......
Read more >config.kit.adapter should be an object with an "adapt" method. See ...
This could be happening if you install the adapter with npm i -D @sveltejs/adapter-static as the version marked at latest on npm is...
Read more >Adapters • Docs • SvelteKit
Adapters are small plugins that take the built app as input and generate output for deployment.
Read more >Challenges with deploying to netlify - Developing with Prismic
I am unable to build locally with the static adapter, I have to use the node adapter. config.kit.adapter should be an object with...
Read more >@sveltejs/adapter-static | Yarn - Package Manager
Adapter for SvelteKit apps that prerenders your entire site as a collection of static files. If you'd like to prerender only some pages,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If the above steps don’t work for you (i.e., you change
^1.0.0-next
tonext
andnpm i
and still get the same error withadapter-static
), explicitly run:And that should fix it.
It looks like you changed it to
^1.0.0-next
. Can you change it to literally justnext
like the other@sveltejs
packages inpackage.json
?