Setup
Requirements
On Windows use a shell such as Git Bash, it will not work with cmd.exe
!
Node.js
The required Node.js version is available in the .node-version
file.
- Windows
- macOS
- Linux
Python 3
Required only on Windows because of native dependencies!
winget install -e --id Python.Python.3.9
Or manually with the installer.
Microsoft Visual C++ (MSVC)
Required only on Windows because of native dependencies!
Install Visual Studio 2022 and make sure to select/install the component Desktop development with C++
during the installation.
PostgreSQL
The default database's name is csdm
but it's recommended to create a development database, for example csdm_dev
.
Using a development database allows you to work on the application and play CS without worring about breaking your main database schema and data.
You can setup the database using Docker or the classic PostgreSQL installation.
Database in Docker
While the PostgreSQL process can be run in a Docker container, the psql
CLI must be installed on the host machine!
Installing psql
To install only psql
:
- Windows
- macOS
- Linux
Follow the installation documentation and install only the Command Line Tools
component during the process.
brew install libpq
echo 'export PATH="/opt/homebrew/opt/libpq/bin:$PATH"' >> ~/.zshrc
Or follow the installation documentation and install only the Command Line Tools
component during the process.
Installation depends on your distribution, for example on Ubuntu:
sudo apt install postgresql-client -y
Starting the container
From the root project folder:
- [Optional]
cp .env.example .env
and edit configuration variables ./docker/start.sh
If you are on Windows with WSL 2, you might notice a RAM usage increase by the process vmmem
.
It's a WSL known issue that haven't been fixed yet, you can use this workaround in the meantime.
Stopping the container
From the root project folder:
./docker/stop.sh
Start developing
cp .env.example .env
and edit variables if needednpm install
npm run dev
Troubleshooting
Cannot find module 'winregistry.node'
[ERROR] [plugin native-node-modules] Cannot find module '../build/Release/winregistry.node'
This error occurs when Python 3
or the Desktop development with C++
Visual Studio component are not installed.
Please make sure to install all required dependencies.