Prerequisites
To get the most out of this book and ensure you retain the information provided, it is recommended to work alongside the material as you read it. Type the commands and code shown into your project, but also feel free to experiment. To do this effectively, you will need a computer running Windows, macOS, or a Linux-based operating system as well as access to a terminal or command-line interface. Most modern computer hardware capable of running the latest versions of the aforementioned operating systems should be sufficient for your needs. Specifically, you’ll need a system with a minimum of 1 GB of RAM and at least a 1.6 GHz processor. This should work just fine for developing with SvelteKit, though performance may vary for your operating system.
Like many other web development projects, you’ll also need a web browser. The latest version of Firefox, Chrome, or Safari is recommended. You will also need to install Node.js. It is recommended to use the latest Long-Term Support (LTS) version, which, at the time of writing this book, is version 18. An alternative and often easier method of managing Node.js installation is the Node Version Manager (NVM) project. It allows users to easily install and change versions of Node.js. See the end of this chapter for resources related to both Node.js and NVM. Alongside that, you will also need a package manager. This book will utilize npm
as it is available with a standard Node.js installation. It is possible to use yarn
in place of npm
, but it is probably easier to just use npm
. If you’re worried about performance, pnpm
will also work.
The final tool required will be a text editor or Integrated Development Environment (IDE). The Svelte community supports many editors, but the official SvelteKit documentation recommends using Visual Studio Code (VS Code) along with the Svelte extension. While it is not required, it can certainly ease the pain of dealing with the different syntaxes found in Svelte components. To install Svelte for VS Code, launch VS Code Quick Open with Ctrl + P, type ext install svelte.svelte-vscode
, and hit Enter.
In summary, you will need the following:
- A macOS, Windows, or Linux-based computer
- A modern web browser (Firefox, Chrome, or Safari)
- Terminal access
- Node.js 18+ LTS
- A package manager (
npm
comes installed with Node.js) - A text editor/IDE (with the recommended Svelte extension)