
Explanation:

Step 1: Run pac pcf init -namespace ..
This is the first command which creates basic folder structure of PCF control project.
Run the following command to create the control. The format of the control is:
pac pcf init -namespace < specify your namespace here > -name < put component name here > -template < component type > Step 2: Run the npm install command Install Dependencies Once 'init' sets up the basic folder, as a next step install all the PCF control dependencies using 'npm install' command.
Example:

Now at this point, there is nothing we have actually created. However, the solution created contains sample PCF control code.
Step 3: Run the following np run build command
Build PCF Component.
Once you implement the PCF component, build the code for any syntax errors.
Syntax:
npm run build

Reference:
https://rajeevpentyala.com/2020 /03/21/power-apps-compone nt-framework-pcf-demystify/
https://carldeso uza.com/creating-a-custom-component-using-the-powerapps-component-framework/