nx migrate 19.6.2
pnpm install --no-frozen-lockfile
## if migrations.json was created, run:
nx migrate --run-migrations
For Windows users experiencing issues with nx
, adjust the PowerShell script
execution policy:
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
Review the WebStorm Config - Prettier & ESLint README.
Using one of the two options below, spin up an instance of the database
-
- Set up a Docker-managed database environment with:
docker compose -f docker/docker-compose.yml up -d
- Set up a Docker-managed database environment with:
-
- You will need to figure out how to start the mongo server.
To debug the frontend in JetBrains WebStorm using nx
scripts:
- Open the project in WebStorm.
- Go to
Run
>Edit Configurations
. - Add a new
Nx
configuration by choosing theweb-backend
. - Save the configuration.
- Click the run icon to start the backend server. Once up, the debugger will attach to the running process.
To debug the backend in JetBrains WebStorm using nx
scripts:
- Open the project in WebStorm.
- Navigate to
Run
>Edit Configurations
. - Create a new
Nx
configuration for theweb-editor
. - Save and run the configuration.
- Set up browser debugging following WebStorm's guide.
To debug any other build targets, or CommonJS
, Typescript
, or Node.js
packages, follow these general steps:
- Open the project in WebStorm.
- Go to
Run
>Edit Configurations
. - Click the
+
button to add a new configuration. - Choose
Node.js
for CommonJS or Node.js packages, orTypeScript
for TypeScript packages. - In the
JavaScript file
field, specify the path to the file you want to run or debug. - For Node.js applications, you can also specify environment variables, node parameters, and the working directory if needed.
- Save the configuration by clicking
OK
. - Click the run icon to start the application or the debug icon to start debugging.
When working within the monorepo, it's important to understand the distinction
between scoped packages and workspace-related packages.
Scoped packages are those that are specific to a particular package within the
monorepo, while the workspace package is the one defined
by the package.json
at the repo root.
To install a new package, use the following commands:
- For scoped packages (specific to a project):
pnpm --filter=<project-name> install --save-exact <package-name>
- For workspace-related packages (global to the monorepo):
pnpm -w install --save-exact <package-name>
The --save-exact
flag is enforced to ensure that the exact version of a
package is installed, which helps in maintaining consistency
and avoiding issues with minor updates that may introduce breaking changes.
When installing packages, you also need to decide whether to use --save-dev
or --save
:
- Use
--save-dev
(or-D
) for packages that are only needed during development or for building the project, such as linters, type definitions, or compilers.pnpm --filter=<project-name> install --save-dev --save-exact <package-name>
- Use
--save
(or no flag) for packages that are required at runtime by your package.pnpm --filter=<project-name> install --save --save-exact <package-name>
For package specific testing documentation, refer to the package's corresponding README.md file.
- If dependency issues arise, check for proper camel casing in frontend component filenames and adjust as necessary.
- If
docker compose
fails to work, you can confirm that your configuration is valid by runningdocker compose -f docker/docker-compose.yml config