diff --git a/docs/install/docker_compose_install.md b/docs/install/docker_compose_install.md index 7bbcf401b3..77cdcc8e76 100644 --- a/docs/install/docker_compose_install.md +++ b/docs/install/docker_compose_install.md @@ -44,6 +44,28 @@ That's it! If you need more detailed information on configuring your compose fil ## Updating LibreChat - Run `npm run update` from the project directory for a clean installation. +If you're having issues running this command, you can try running what the script does manually: + +Prefix commands with `sudo` according to your environment permissions. + +```bash +# Fetch the latest changes from Github +git fetch origin +# Switch to the repo's main branch +git checkout main +# Pull the latest changes to the main branch from Github +git pull origin main +# Prune all LibreChat Docker images +docker rmi librechat:latest +# Remove all unused dangling Docker images +docker image prune -f +# Building a new LibreChat image +docker-compose build + +# Start LibreChat +docker-compose up +``` + ## Advanced Settings ### Config notes for docker-compose.yml file diff --git a/docs/install/linux_install.md b/docs/install/linux_install.md index 6b073333bf..2dadff3a88 100644 --- a/docs/install/linux_install.md +++ b/docs/install/linux_install.md @@ -130,6 +130,77 @@ gnome-terminal --tab --title="LibreChat" --working-directory=/home/user/LibreCha - Run `npm run update` from the project directory for a clean installation. +If you're having issues running this command, you can try running what the script does manually: + +Prefix commands with `sudo` according to your environment permissions. + +### Docker + +```bash +# Fetch the latest changes from Github +git fetch origin +# Switch to the repo's main branch +git checkout main +# Pull the latest changes to the main branch from Github +git pull origin main +# Prune all LibreChat Docker images +docker rmi librechat:latest +# Remove all unused dangling Docker images +docker image prune -f +# Building a new LibreChat image +docker-compose build + +# Start LibreChat +docker-compose up +``` + +### Local (npm) + +```bash +# Bash Terminal + +# Step 1: Get the latest changes + +# Fetch the latest changes from Github +git fetch origin +# Switch to the repo's main branch +git checkout main +# Pull the latest changes to the main branch from Github +git pull origin main + +# Step 2: Delete all node_modules directories +# Define the list of directories we will delete +directories=( + "." + "./packages/data-provider" + "./client" + "./api" +) + +# Loop over each directory and delete the node_modules folder if it exists +for dir in "${directories[@]}"; do + nodeModulesPath="$dir/node_modules" + if [ -d "$nodeModulesPath" ]; then + echo "Deleting node_modules in $dir" + rm -rf "$nodeModulesPath" + fi +done + +# Step 3: Clean the npm cache +npm cache clean --force + +# Step 4: Install dependencies +npm ci + +# Step 5: Build client-side (frontend) code +npm run frontend + +# Start LibreChat +npm run backend +``` + +The above assumes that you're using the default terminal application on Linux and are executing the commands from the project directory. The commands are written in Bash, which is a common default shell for many Linux distributions. While some systems might use other shells like `zsh` or `fish`, these commands should be compatible with most of them. + --- >⚠️ Note: If you're having trouble, before creating a new issue, please search for similar ones on our [#issues thread on our discord](https://discord.gg/weqZFtD9C4) or our [troubleshooting discussion](https://github.com/danny-avila/LibreChat/discussions/categories/troubleshooting) on our Discussions page. If you don't find a relevant issue, feel free to create a new one and provide as much detail as possible. diff --git a/docs/install/mac_install.md b/docs/install/mac_install.md index d361cba73d..bce2400174 100644 --- a/docs/install/mac_install.md +++ b/docs/install/mac_install.md @@ -90,6 +90,75 @@ npm run backend - Run `npm run update` from the project directory for a clean installation. +If you're having issues running this command, you can try running what the script does manually: + +### Docker + +```bash +# Fetch the latest changes from Github +git fetch origin +# Switch to the repo's main branch +git checkout main +# Pull the latest changes to the main branch from Github +git pull origin main +# Prune all LibreChat Docker images +docker rmi librechat:latest +# Remove all unused dangling Docker images +docker image prune -f +# Building a new LibreChat image +docker-compose build + +# Start LibreChat +docker-compose up +``` + +### Local (npm) + +```bash +# Terminal on macOS, prefix commands with `sudo` as needed + +# Step 1: Get the latest changes + +# Fetch the latest changes from Github +git fetch origin +# Switch to the repo's main branch +git checkout main +# Pull the latest changes to the main branch from Github +git pull origin main + +# Step 2: Delete all node_modules directories +# Define the list of directories we will delete +directories=( + "." + "./packages/data-provider" + "./client" + "./api" +) + +# Loop over each directory and delete the node_modules folder if it exists +for dir in "${directories[@]}"; do + nodeModulesPath="$dir/node_modules" + if [ -d "$nodeModulesPath" ]; then + echo "Deleting node_modules in $dir" + rm -rf "$nodeModulesPath" + fi +done + +# Step 3: Clean the npm cache +npm cache clean --force + +# Step 4: Install dependencies +npm ci + +# Step 5: Build client-side (frontend) code +npm run frontend + +# Start LibreChat +npm run backend +``` + +The above assumes that you're using the default Terminal application on macOS and are executing the commands from the project directory. The commands are written in Bash, which is the default shell for macOS (though newer versions use `zsh` by default, but these commands should work there as well). + --- >⚠️ Note: If you're having trouble, before creating a new issue, please search for similar ones on our [#issues thread on our discord](https://discord.gg/weqZFtD9C4) or our [troubleshooting discussion](https://github.com/danny-avila/LibreChat/discussions/categories/troubleshooting) on our Discussions page. If you don't find a relevant issue, feel free to create a new one and provide as much detail as possible. diff --git a/docs/install/windows_install.md b/docs/install/windows_install.md index fb6bc5ae49..34f512e0a7 100644 --- a/docs/install/windows_install.md +++ b/docs/install/windows_install.md @@ -104,6 +104,75 @@ Using the command line (in the root directory) - Run `npm run update` from the project directory for a clean installation. +If you're having issues running this command, you can try running what the script does manually: + +### Docker + +```bash +# Fetch the latest changes from Github +git fetch origin +# Switch to the repo's main branch +git checkout main +# Pull the latest changes to the main branch from Github +git pull origin main +# Prune all LibreChat Docker images +docker rmi librechat:latest +# Remove all unused dangling Docker images +docker image prune -f +# Building a new LibreChat image +docker-compose build + +# Start LibreChat +docker-compose up +``` + +### Local (npm) + +```powershell +# Windows PowerShell terminal + +# Step 1: Get the latest changes + +# Fetch the latest changes from Github +git fetch origin +# Switch to the repo's main branch +git checkout main +# Pull the latest changes to the main branch from Github +git pull origin main + +# Step 2: Delete all node_modules directories +# Define he list of directories we will delete +$directories = @( + ".", + ".\packages\data-provider", + ".\client", + ".\api" +) + +# Loop over each directory and delete the node_modules folder if it exists +foreach ($dir in $directories) { + $nodeModulesPath = Join-Path -Path $dir -ChildPath "node_modules" + if (Test-Path $nodeModulesPath) { + Write-Host "Deleting node_modules in $dir" + Remove-Item -Recurse -Force $nodeModulesPath + } +} + +# Step 3: Clean the npm cache +npm cache clean --force + +# Step 4: Install dependencies +npm ci + +# Step 5: Build client-side (frontend) code +npm run frontend + +# Start LibreChat +npm run backend +``` + +The above assumes that you're using the Windows PowerShell application on a Windows system and are executing the commands from the project directory. The commands are tailored for PowerShell, which is a powerful scripting environment native to Windows. While Windows also offers the Command Prompt and newer versions have the Windows Subsystem for Linux (WSL), the provided instructions are specifically designed for PowerShell. + --- >⚠️ Note: If you're having trouble, before creating a new issue, please search for similar ones on our [#issues thread on our discord](https://discord.gg/weqZFtD9C4) or our [troubleshooting discussion](https://github.com/danny-avila/LibreChat/discussions/categories/troubleshooting) on our Discussions page. If you don't find a relevant issue, feel free to create a new one and provide as much detail as possible.