From d008fa224f07388a5419f94f7ea9dfef5082b22b Mon Sep 17 00:00:00 2001 From: Boris Martinovic Date: Thu, 16 Jan 2025 19:23:04 +0100 Subject: [PATCH] Added post-installation WSL2 steps --- .../src/content/docs/start/getting-started.md | 47 ++++++++++++++++--- 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/blog/src/content/docs/start/getting-started.md b/blog/src/content/docs/start/getting-started.md index 4de82bd4..7839f54c 100644 --- a/blog/src/content/docs/start/getting-started.md +++ b/blog/src/content/docs/start/getting-started.md @@ -18,6 +18,7 @@ Your version of Node.js must be >= 18. To switch easily between Node.js versions, we recommend using [nvm](https://github.com/nvm-sh/nvm). :::note[Installing and using nvm] +
Need help with nvm? @@ -54,7 +55,6 @@ Check NVM repo for more details: https://github.com/nvm-sh/nvm.
::: - ### Linux and macOS Open your terminal and run: @@ -64,6 +64,7 @@ curl -sSL https://get.wasp-lang.dev/installer.sh | sh ``` :::caution[Bad CPU type in executable] +
Are you getting this error on a Mac (Apple Silicon)? @@ -73,6 +74,7 @@ Given that the wasp binary is built for x86 and not for arm64 (Apple Silicon), y ```bash softwareupdate --install-rosetta ``` + Once Rosetta is installed, you should be able to run Wasp without any issues. ::: @@ -80,23 +82,54 @@ Once Rosetta is installed, you should be able to run Wasp without any issues. ### Windows -In order to use Wasp on Windows, you need to install WSL2 (Windows Subsystem for Linux) and a Linux distribution of your choice. We recommend using Ubuntu. +In order to use Wasp on Windows, you need to install WSL2 (Windows Subsystem for Linux) and a Linux distribution of your choice. We recommend using Ubuntu. **You can refer to this [article](https://wasp-lang.dev/blog/2023/11/21/guide-windows-development-wasp-wsl) for a step by step guide to using Wasp in the WSL environment.** If you need further help, reach out to us on [Discord](https://discord.gg/rzdnErX). -Once in WSL2, run the following command in your **WSL2 environment**: +:::caution[WSL2 Docker post installation steps] + +
+ + Complete those steps to ensure that PostgreSQL and Docker work correctly with Wasp in WSL2. + +It is recommended to complete those post-install steps in WSL, based on the official Docker guide. These work if you are experiencing an error similar to this one. + +First, run + +```bash +sudo groupadd docker +``` + +command to create the `docker` group in case it doesn't exist. If it exists, don't worry, just continue with next steps. After that, add your current user to docker group by running + +```bash +sudo usermod -aG docker $USER +``` + +where $USER is your username. After that, log out and log back in to apply the changes. Finally, run + +```bash +su -s $USER +``` + +
+::: + +Once done, in WSL2 run the following command in your **WSL2 environment**: + ```sh curl -sSL https://get.wasp-lang.dev/installer.sh | sh ``` :::caution[WSL2 and file system issues] +
Are you getting file system issues using WSL2? If you are using WSL2, make sure that your Wasp project is not on the Windows file system, but instead on the Linux file system. Otherwise, Wasp won't be able to detect file changes, due to this issue in WSL2.
-::: +::: ### Finalize Installation @@ -117,6 +150,7 @@ You can install the Wasp VSCode extension by searching for "Wasp" in the Extensi ### Cloning the OpenSaaS template From the directory where you'd like to create your new project run: + ```sh wasp new ``` @@ -187,8 +221,9 @@ This will install all the dependencies and start the app (client and server) for If the app doesn't open automatically in your browser, you can open it manually by visiting `http://localhost:3000` in your browser. At this point, you should have: - - your database running in one terminal session, likely on port `5432`. - - your app running in another terminal session, the client likely on port `3000`, and the server likely on port `3001`. + +- your database running in one terminal session, likely on port `5432`. +- your app running in another terminal session, the client likely on port `3000`, and the server likely on port `3001`. #### Run Blog and Docs