Prerequisite steps for WSL on Windows

  1. Make sure your WSL is fully installed correctly, following these steps. You should not use WSL-1.
  2. Make sure Docker is correctly configured to work with WSL, following these steps.

According to the best practices given in the Docker WSL information (at least when this was written), it is best to work in the Linux container rather than the Windows file system. This means you should clone OED into the Linux file system and run your code environment (such as Visual Studio Code) there as well. The information below assumes you have done this and the commands given are run in a Linux shell. Specifically, this means:

  1. You do the git clone <OED GitHub address> in the Linux filesystem. Normally this is done by opening the Linux terminal. You do not want the OED clone on your machine to be on the Windows partition.
  2. To use Visual Studio Code, you will start it from the Linux terminal by doing the following:
    1. Open your Linux terminal. This is commonly the Ubuntu terminal for WSL.
    2. Go to the Linux directory with OED in a Linux terminal by doing: cd <path to OED main code directory>
    3. Start Visual Studio Code by doing: code . (This will start VSC and make the current directory be the code you will work on.) Note the first time you may need to install VSC; This normally happens automatically on Ubuntu. After the first time you can normally click the VSC icon on Windows to start it. It will reopen with the WSL project if that was the last one. If not, you can open the project folder from recent ones or via the command "WSL: Open Folder in WSL...". If you ever have a folder open outside WSL but it is actually on WSL then you can use the command to reopen in WSL (sometimes VSC will suggest you do that).
    4. All the other steps should be the same as on the getting started directions.

Errors running docker compose up might throw:

  1. FileNotFoundError: [Errno 2] No such file or directory


    Ensure that docker is installed correctly and running - the Docker system tray icon's tooltip should specify that Docker Desktop is running.
  2. When you first install OED, you get some sort of error message (often about not being able to write the pg_wal file). This leads to the database going into a panic stop and the database container exiting. When this has been seen, the web container continues to run and the npm install continues/completes. Note it can take a while for the npm install to finish but wait and hopefully this will happen. You will likely then get a message about trying to start to database but nothing after that one line. At this point, stop the install.
    • If in the VSC container then rebuild the container.
    • If OED was started in a terminal then do a single ^c (control and letter c) or docker compose down in a second terminal where it is in the same OED directory as the install is happening. You should now be back at the command line. Do another docker compose up to restart OED.

    Normally this will complete the installation fairly quickly without further issues. For now, we encourage you to do these exact steps since deviations have been known to cause it to fail. If have issues then please contact us.

Script errors

If you have the OED files stored on the Windows file system, then issues will likely occur. It can happen on install, when you run checks (linting) and for other OED scripts. This is because the file format is a little different. The best solution is to keep all files on the Linux file system (as suggested above). It is possible to modify the scripts with but this is not the recommended solution.