Prerequisites
Confirm the following tools are available on your system before proceeding.| Requirement | Minimum version | Notes |
|---|---|---|
| Node.js | 18.x | LTS recommended. Download from nodejs.org. |
| npm | Bundled with Node.js | Alternatively, use yarn or pnpm. |
| Angular CLI | 20.x | Installed globally via npm. |
| Git | Any recent version | Required to clone the repository. |
Full installation
Navigate to the project directory
Move into the cloned project folder.All subsequent commands should be run from this directory.
Install dependencies
Install all project dependencies defined in This downloads Angular packages and all third-party libraries into the
package.json.node_modules/ directory. The first install may take a minute or two depending on your network speed.Start the development server
Start the Angular development server with live reload.The CLI compiles the application and starts a local HTTP server. When compilation finishes you will see output similar to:
To run the server on a different port, use the This is useful when port 4200 is already occupied by another process.
--port flag:Angular CLI command reference
The following Angular CLI commands are available in this project. Run them from thegems-lms-web directory.
| Command | Description |
|---|---|
ng serve | Starts the local development server with live reload at http://localhost:4200. |
ng build | Compiles the application into static output files in dist/. |
ng test | Runs unit tests using Karma and Jasmine. Watches for file changes by default. |
ng generate | Scaffolds new Angular building blocks (components, services, modules, pipes, etc.). |
ng e2e | Runs end-to-end tests. Requires a configured e2e test runner such as Cypress or Playwright. |
For a production-optimized build, pass the Production build output is written to
--configuration production flag to ng build. This enables ahead-of-time (AOT) compilation, tree-shaking, and output minification.dist/gems-lms-web/ and is ready to be served by any static file server or CDN.Troubleshooting
Port 4200 is already in use
Port 4200 is already in use
If you see an error such as Option 2: Find and stop the process using port 4200.Then re-run
Port 4200 is already in use, another process is occupying the default Angular port. You have two options:Option 1: Start the server on a different port.ng serve.node_modules is missing or incomplete
node_modules is missing or incomplete
If the development server fails to start with module-not-found errors, the If you are using yarn or pnpm, substitute the corresponding install command. This is also the recommended fix after switching branches that have different dependency versions.
node_modules/ directory may be missing or out of date. Run a clean install:Angular CLI version mismatch
Angular CLI version mismatch
The global Angular CLI version and the version required by the project must be compatible. A mismatch can cause build errors or unexpected behavior.Check the versions:If the versions differ significantly, update the global CLI to match the project:Alternatively, use
npx to run the project-local version of the CLI without affecting your global install: