Troubleshooting and Common Errors


Cannot find module 'outstatic/client' or 'outstatic/server' or its corresponding type declarations.

Update your tsconfig.json :

# from:
"moduleResolution": "node",
 
# to:
"moduleResolution": "bundler",

Troubleshooting Login and Repository Access Issues.

Many users encounter login issues due to either missing the correct environment variables or lacking the necessary permissions for a repository.

If you're using Outstatic with a GitHub repository you don't own, ensure you've set the OST_REPO_OWNER environment variable to the repository's owner.

For repositories you own, ensure the OST_REPO_SLUG environment variable reflects the correct repository name. Remember, the repository name shouldn't include the username. For instance, use outstatic instead of avitorio/outstatic for the OST_REPO_SLUG.

Lastly, if you're attempting to access a repository you don't own, ensure the repository owner has granted you collaborator access. Without this, you won't have full dashboard access.

Important: Don't forget to redeploy your website or restart your server after making changes to your environment variables.

I can't see my changes locally

Outstatic uses your GitHub as the single source of truth. Once content is saved your repository gets updated. To see the changes locally you will need to run git pull.

Make sure are on the same branch locally as your Outstatic instance.

Next.js < 13.4.8 error

In case your Outstatic Dashboard throws errors while trying to create new pages. Either update Next.js to a version above 13.4.8 or add the option swcMinify: false to your next.config.js file. Example:

const nextConfig = {
  swcMinify: false
}

We recommend you learn how Outstatic manages content and also how to fetch data from your front end.

Installation on Next.js 12

If you want to use Outstatic with Next.js 12, you can continue here.