DEV Community

Discussion on: How to use SvelteKit with Netlify Forms

Collapse
 
inspiredlabs profile image
Inspired Labs - London, United Kingdom • Edited

Please can you link to your preferred method of switching adapters from local to Netlify? (mine is super-clunky, perhaps one using ENV variables).

Also, do you have advice for the version mismatch:

5:32:54 PM: npm ERR! notsup Unsupported engine for @sveltejs/kit@1.0.0-next.142: wanted: {"node":"^12.20 || >=14.13"} (current: {"node":"12.18.0","npm":"6.14.4"})
5:32:54 PM: npm ERR! notsup Not compatible with your version of node/npm: @sveltejs/kit@1.0.0-next.142
5:32:54 PM: npm ERR! notsup Not compatible with your version of node/npm: @sveltejs/kit@1.0.0-next.142
5:32:54 PM: npm ERR! notsup Required: {"node":"^12.20 || >=14.13"}
5:32:54 PM: npm ERR! notsup Actual:   {"npm":"6.14.4","node":"12.18.0"}
Enter fullscreen mode Exit fullscreen mode

I've noticed that when cloning your repo. Thanks for the great tuts so far.

Collapse
 
swyx profile image
swyx

i dont understand what you mean by "switching adapters from local to Netlify". there is no local adapter?

yes for the netlify node version we actually have this in the readme github.com/sveltejs/kit/tree/maste...

Netlify defaults to Node 12.16. SvelteKit requires Node v12.20 to build. You can pin the Node version with a .node-version or .nvmrc file: echo "14" > .nvmrc or set the NODE_ENV environment variable.