Files
twenty_crm/packages/twenty-website/src/content/developers/self-hosting/troubleshooting.mdx
BOHEUS c3d96b1dd8 Docs troubleshooting page (#8312)
Related to #8296

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-11-24 22:26:54 +01:00

113 lines
3.6 KiB
Plaintext

---
title: Troubleshooting
icon: TbCloud
image: /images/user-guide/what-is-twenty/20.png
---
## Troubleshooting
If you encounter any problem while setting up environment for development, upgrading your instance or self-hosting,
here are some solutions for common problems.
### Self-hosting
#### CR line breaks found [Windows]
This is due to the line break characters of Windows and the git configuration. Try running:
```
git config --global core.autocrlf false
```
Then delete the repository and clone it again.
#### Missing metadata schema
During Twenty installation, you need to provision your postgres database with the right schemas, extensions, and users.
If you're successful in running this provisioning, you should have `default` and `metadata` schemas in your database.
If you don't, make sure you don't have more than one postgres instance running on your computer.
#### Cannot find module 'twenty-emails' or its corresponding type declarations.
You have to build the package `twenty-emails` before running the initialization of the database with `npx nx run twenty-emails:build`
#### Missing twenty-x package
Make sure to run yarn in the root directory and then run `npx nx server:dev twenty-server`. If this still doesn't work try building the missing package manually.
#### Lint on Save not working
This should work out of the box with the eslint extension installed. If this doesn't work try adding this to your vscode setting (on the dev container scope):
```
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
```
#### While running `npx nx start` or `npx nx start twenty-front`, Out of memory error is thrown
In `packages/twenty-front/.env` uncomment `VITE_DISABLE_TYPESCRIPT_CHECKER=true` and `VITE_DISABLE_ESLINT_CHECKER=true` to disable background checks thus reducing amount of needed RAM.
#### While running `npx nx start` there are weird [0] and [1] in logs
That's expected as command `npx nx start` is running more commands under the hood
#### While running `yarn` warnings appear in console
Warnings are informing about pulling additional dependencies which aren't explicitly stated in `package.json`, so as long as no breaking error appears, everything should work as expected.
#### When user accesses login page, error about unauthorized user trying to access workspace appears in logs
That's expected as user is unauthorized when logged out since its identity is not verified.
### 1-click Docker compose
#### Unable to Log In
If you can't log in after setup:
1. Run the following commands:
```bash
docker exec -it twenty-server-1 yarn
docker exec -it twenty-server-1 npx nx database:reset
```
2. Restart the Docker containers:
```bash
docker-compose down
docker-compose up -d
```
#### Connection Issues Behind a Reverse Proxy
If you're running Twenty behind a reverse proxy and experiencing connection issues:
1. **Verify SERVER_URL:**
Ensure `SERVER_URL` in your `.env` file matches your external access URL, including `https` if SSL is enabled.
2. **Check Reverse Proxy Settings:**
- Confirm that your reverse proxy is correctly forwarding requests to the Twenty server.
- Ensure headers like `X-Forwarded-For` and `X-Forwarded-Proto` are properly set.
3. **Restart Services:**
After making changes, restart both the reverse proxy and Twenty containers.
## Getting Help
If you encounter issues not covered in this guide:
- Check Logs:
View container logs for error messages:
```bash
docker-compose logs
```
- Community Support:
Reach out to the [Twenty community](https://github.com/twentyhq/twenty/issues) or [support channels](https://discord.gg/cx5n4Jzs57) for assistance.