Files
Trilium/docs/Developer Guide/Developer Guide/Environment Setup.md
2025-11-04 15:51:54 +02:00

36 lines
1.6 KiB
Markdown
Vendored
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Environment Setup
## Setting up `pnpm`
Trilium uses the `pnpm` package manager in order to better manage its mono-repo structure. Unlike `npm` which comes by default with Node.js, `pnpm` needs to be manually activated.
For most systems this can be achieved via `corepack`:
```
corepack enable
```
After that, run `pnpm` in a new terminal to see if it is working. On Windows, if you get:
```
pnpm : The term 'pnpm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
```
The solution is to run `corepack enable` in a Terminal with administrative rights.
As a quick heads-up of some differences when compared to `npm`:
* Generally instead of `npm run` we have `pnpm run` instead.
* Instead of `npx` we have `pnpm exec`.
## Installing dependencies
Run `pnpm i` at the top of the `Notes` repository to install the dependencies.
> [!NOTE]
> Dependencies are kept up to date periodically in the project. Generally it's a good rule to do `pnpm i` after each `git pull` on the main branch.
## IDE
Our recommended IDE for working on Trilium is Visual Studio Code (or VSCodium if you are looking for a fully open-source alternative).
By default we include a number of suggested extensions which should appear when opening the repository in VS Code. Most of the extensions are for integrating various technologies we are using such as Playwright and Vitest for testing or for <a class="reference-link" href="Concepts/Internationalisation%20%20Translat.md">Internationalisation / Translations</a>.