Setting up UI middleware
To customize and develop an application, you must set up the UI middleware.
Note: For application build commands, ensure that you install bash-based terminals. For example, git
bash.
To set up the UI middleware, complete the following steps:
- Download and install Node.Js version 18.20.0. .
- In the
PATH
environment variable, update /path/to/nodejs-18.20.0/bin. - Verify the node version by running the following command:
node -v
- Install yarn, version 1.22.5 globally by running the following
command:
npm install --global yarn@1.22.5
- Verify the yarn version by running the following command:
yarn -v
Note: On Windows 10 or 11, if you encounter the error,yarn: command not found
, set the correct PATH to your system environmental variables. Then, open your terminal and run the following command:npm config get prefix
The command returns the path where
npm
adds your globally installed packages. For example,C:\Users\Your_User_Name\AppData\Roaming\npm
. Copy the path from your terminal and add to your system environment variables. Then, restart the terminal for the changes to take effect. - Install Angular CLI as a global module by running the following command:
npm install -g @angular/cli@18.2.12
- Install Lerna as a global module by running the following
command:
npm install -g lerna@4.0.0
- Optional. Customize the
package.json
to provide specific values for the project metadata and the dependent by customizing the following command:npm init
To customize thenpm init
command, complete the following steps:- Determine the value of
init-module
by running the following command:npm config get init-module
Locate the
.npm-init.js
file. - Open the
.npm-init.js
file, copy the following code snippet, and save your changes.module.exports = { name: basename, version: "0.0.1", private: true, scripts: {}, dependencies: {} }
If you cannot find the
.npm-init.js
file, create this file, copy the code snippet, and save your changes.Note: To verify whether the.npm-init.js
file is present, run the following command:
Thenpm init -y
package.json
file is generated in the same directory where you ran the command with the default values that are defined in the.npm-init.js
file.
- Determine the value of