1 | initial version |
To execute the npm install command for the build using Lerna and npm packages, you should follow these steps:
Open the terminal in the root directory of your project.
Install Lerna globally by running the following command:
npm install -g lerna
Initialize Lerna in your project by running the following command:
lerna init
Create a packages directory in your project by running the following command:
mkdir packages
In the packages directory, create a new directory for each package you want to use and navigate to it. For example:
cd packages
mkdir my-package
cd my-package
Initialize npm in the package directory by running the following command:
npm init -y
Install the necessary packages for your package using the following command:
npm install <package-name> --save
Repeat steps 5-7 for each package that you want to use.
In the root directory of your project, run the following command to install all the packages in all the packages directories:
lerna bootstrap
Finally, build your project using the following command:
lerna run build
These steps will execute the npm install command for the build using Lerna and npm packages.