Troubleshooting

Find help for common issues

The BACKEND_URL env variable is not set

Full Error Message:

The BACKEND_URL env variable is not set. Open the `.env` file and set the value. You can find the value in your Thin project settings.

Problem:

The Thin client needs to know to which Thin project he should connect to. In most project templates this is specified by setting an environment variable BACKEND_URL. This BACKEND_URL value is then passed to initThinBackend(..).

Solution:

  1. Open .env in the project directory. Create an empty if the .env file doesn't exist yet.
  2. Copy the env var for your Thin project into the .env file:

    ProjectEnv Var
  3. Start npm run dev again. If you already have a npm run dev running, make sure to restart the command so that the env vars are reloaded.
Community

If you need any help or input, feel free to ask in the Thin Community Forum.