Prerequisites

Code editor

We strongly recommend using VS Code, which will allow you to take advantage of useful snippets and built-in linting/prettifying that will help identify and fix errors in your code. We also recommend you install the Svelte 3 Snippets extension, which will help you write basic Svelte syntax.

Node

The kit requires a minimum version of node, which will be specified in the engines key of package.json. We highly recommend using a node version manager so you can easily switch which version of node you want to use.

n is a great option and can be installed easily on a mac using brew:

brew install n

Once installed, you can use it to download and install any version of node:

n 16.7

Svelte

The kit uses Svelte, and you’ll want to understand a few basics before diving in.

Check out the first few sections of the official tutorial for an intro to the framework, and then read further through these docs to learn how to build your pages with Svelte.

ES modules

The kit uses SvelteKit (currently in beta), which in turn uses a build tool called Vite. Both can be tempermental with libraries that weren’t built for a world with ES modules.

Where you can, use modern libraries that package code as ESM (most use a “module” key in package.json). If you’re still running into issues with a dependency, check out the SvelteKit FAQ and, if you really need to dig in, the docs on Vite’s dependency pre-bundling feature to deal with non-ESM code.

You’ll also want to write your code using ES module syntax: import/export instead of require/module.exports. Here’s an intro.