Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Common Installation Problems

Matt Czyr edited this page Mar 2, 2021 · 10 revisions

Problems with Postgres

  • If running the command createdb shuttletracker returns the error createdb: could not connect to database postgres: FATAL: role "<username>" does not exist, it is because a a Postgres user has not been created for you. It can be fixed by running:
    • psql -U postgres in terminal
    • CREATE USER <username>; in postgres=#
    • ALTER USER <username> SUPERUSER CREATEDB; in postgres=#
    • Confirm the resolved is error by running \du in postgres=#.
  • If you receive a message stating that the server could not be started when trying to create the database, run sudo service postgresql start and try again.
  • If when running createdb shuttletracker you get an error about not being able to do this as root, follow these steps to create a new Linux superuser:
    • Run sudo adduser <name of new user>
    • Enter a password for the new user
    • Enter some additional information about the user, or press enter to skip
    • Run sudo usermod -aG sudo <name of new user>
    • Ensure the new user is a superuser by running groups <name of new user>
    • Switch to the new superuser by running su - <name of new user>
  • When changing the Postgres URL in conf.json, you might be unsure of what the password is. In this case, open PostgreSQL using sudo -u postgres psql postgres and then run alter user postgres with password 'postgres' to set the password to simply postgres.

Problems Building the Backend

  • If the terminal displays the error $GOPATH not set when running the go build command:
    • Open your shell's configuration file with sudo vim ~/.bashrc, sudo vim ~/.zshrc, or similar depending on your shell
    • Set the $PATH by adding export PATH=$PATH:/usr/local/go/bin to the end of the file
    • Set the $GOPATH by adding export GOPATH=$HOME/<path to your Shuttle Tracker directory> to the end of the file
    • Reload your shell's configuration with source ~/.bashrc, source ~/.zshrc, etc.

Problems with Node

  • If you ran n stable to get the correct version of Node and get an error beginning with Node Sass could not find a binding for your current environment while trying to run npx vue-cli-service build --mode development, use npm rebuild node-sass to correct it.
  • If when running npx vue-cli-service build --mode development you get an error saying npx is an unknown command, try restarting your computer. Alternatively, you can try reloading your terminal configuration with source ~/.bashrc or a similar command depending on your operating system and shell. If all else fails, try reinstalling Node.
  • If running sudo apt-get install nodejs on Linux/WSL installs version 8.10.0 instead of the latest version:
    • Install n by running sudo npm install -g n
    • Get the most recent version of node with n stable
    • Run sudo rm /usr/local/bin/node to remove the old version of node
    • Run node -v to ensure you now have the latest version.

Problems with npm

  • Issues related to npm are likely due to an incorrect Node version. Ensure you have the correct version with node -v.
  • You can ignore the vulnerabilities npm install warns you about. Not all current versions of the libraries Shuttle Tracker uses function properly, so npm fix will break things.

Note for Linux/WSL

If you need a fresh start, you can use sudo apt-get --purge remove <package name> to completely uninstall any of the above packages so you can try again.