fix: fix root start script (#5032)

Fixes #5022

See https://nx.dev/recipes/running-tasks/root-level-scripts#setup
This commit is contained in:
Thaïs
2024-04-19 18:28:02 +02:00
committed by GitHub
parent 43f0b11aab
commit d3170fc1ea
28 changed files with 94 additions and 79 deletions

View File

@ -14,30 +14,30 @@ import DocCardList from '@theme/DocCardList';
## Useful commands
These commands should be exectued from packages/twenty-server folder.
From any other folder you can run `yarn nx <command>` twenty-server.
From any other folder you can run `npx nx <command>` twenty-server.
### First time setup
```
yarn nx database:reset # setup the database with dev seeds
npx nx database:reset # setup the database with dev seeds
```
### Starting the app
```
yarn nx start
npx nx start
```
### Lint
```
yarn nx lint
npx nx lint
```
### Test
```
yarn nx test:unit
npx nx test:unit
```
### Resetting the database
@ -45,7 +45,7 @@ yarn nx test:unit
If you want to reset the database, you can run the following command:
```bash
yarn nx database:reset
npx nx database:reset
```
:::warning

View File

@ -24,11 +24,11 @@ If you don't, make sure you don't have more than one postgres instance running o
## 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 `yarn nx run twenty-emails:build`
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 `yarn nx server:dev twenty-server`. If this still doesn't work try building the missing package manually.
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

View File

@ -182,7 +182,7 @@ yarn
Setup your database with the following command:
```bash
yarn nx database:reset twenty-server
npx nx database:reset twenty-server
```
Start the server and the frontend:

View File

@ -44,7 +44,7 @@ FILE_TOKEN_SECRET=replace_me_with_a_random_string_refresh
If you encounter errors, (not able to log into the application after inputting an email) after the inital setup, try running the following commands and see if that solves your issue.
```
docker exec -it twenty-server-1 yarn
docker exec -it twenty-server-1 yarn nx database:reset
docker exec -it twenty-server-1 npx nx database:reset
```
### Cannot connect to server, running behind a reverse proxy