Documentation

Troubleshooting

Find answers to questions that have been asked by other developers and might help you too.

My environment variables from .env.local are not being loaded

Make sure you are running the pnpm dev command from the root directory of your project (where the pnpm-workspace.yaml file is located)

supastarter uses the dotenv-cli to load environment variables from a .env.local file. The dotenv-cli is automatically used when running the pnpm dev command from the root directory.

Also make sure that the environment variable you are trying to access in your application is listed in the globalEnv object in the turbo.json file. Only then will turbo make the environment variable available to the runtime.

{
  "globalEnv": {
    "NUXT_PUBLIC_SUPABASE_URL": "https://your-supabase-url.supabase.co"
  }
}

How do I use the debugger in VSCode with supastarter?

To use the debugger in VSCode with supastarter, you need to add a new configuration to your .vscode/launch.json file:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Server DEBUG",
      "runtimeExecutable": "pnpm",
      "runtimeArgs": ["run", "dev"],
      "restart": true,
      "console": "integratedTerminal",
      "cwd": "${workspaceFolder}/apps/web",
      "envFile": "${workspaceFolder}/.env.local"
    }
  ]
}

The changes in the tailwind theme configuration are not being applied

There is a known issue with Tailwind CSS in monorepos which requires you to restart the development server after changing the theme configuration. If this does not work, try also saving the globals.css file in the web package and do a hard refresh in the browser.

On this page