- Recent Node version. Recommended the latest LTS version (>=18)
- pnpm >=8.6 required to install the dependencies in this project
- git > 2.13 required to run the installation script
Welcome to Mastering Pinia! To get started, run the following command:
npx zx@7.2 https://esm.is/mastering-pinia
This will create a mastering-pinia-exercises
folder with all the exercises in your Home folder. You can pass a
different path as --dir
or as the last argument to the command to change the location of the folder.
npx zx@7.2 https://esm.is/mastering-pinia --dir my-folder
Note
This also allows to update the exercises to the latest version by running the same command!
-
Sometimes you might get stuck on the
$ fetch
step:In that case, press Enter to continue.
-
Run with the
-v
flag to get more information about what is happening -
If you get a Did you accept the Github invitation? message, try to manually clone the repository:
git clone https://github.com/MasteringPinia/mastering-pinia--code.git temporary-folder
Once you can clone it, you should be able to delete that
temporary-folder
and run the script again.-
If this didn't work for you, maybe because you use different credentials on the same computer (work + personal), you can use the credential options in your
.gitconfig
-
You can also manually pass the URL with your login information to the script with the
--url
option:npx zx@7.2 https://esm.is/mastering-pinia --url https://username:password@github.com/username/repository.git
-
-
If you get an
EACCESS
error or a port is already used error, give fkill a try to kill othervitest
,vite
or evennode
processes.
-
Prefer using Git Bash to run the commands
-
You can skip the version checks by passing
--skipChecks
to the script:npx zx@7.2 https://esm.is/mastering-pinia --skipChecks