cancel
Showing results for 
Search instead for 
Did you mean: 
capuanodanilo

How To configure Node.js and Typescript into your environment to develop PowerApps Component Frameworks (PCF)

Scenario: in this post we will see how configure Node.js and Typescript into your machine to develop your first custom component (PCF).

Solution:  installing TypeScript we install the TypeScript compiler tsc. The compiler is the main component you need to compile your TypeScript code into JavaScript that will be sent to the browser to execute:

 

1

 

Currently there is one main way to install TypeScript that works for all editors and environments by using Node Package Manager npm that runs through the command line. To install the TypeScript compiler package, you need the Node Package Manager.

Installation Steps:

2-1

 

Once downloaded, go through the steps to install Node.js

 

3

 

Once installation is complete, you have Node.js and npm ready on your machine. Check that by running npm version command in your command prompt:

 

1-1

 

Next open your command prompt and type npm install -g typescript to install Typescirpt:

 

2-2

 

TypeScript will install and the command line will prompt you that TypeScript has been successfully installed and will provide you with the installed version.

Once you have TypeScript compiler installed you can use the tsc command to access the compiler at any time. To see the list of the tsc commands and their usages, run the tsc command in your command line:

 

3-1

 

Hope it helps and happy 365Power’ing!