You can install node.js from the node.js official website:
$ node --version v16.14.0
Most node.js installations come with
npm, the node package manager.
In some cases, you may have to install it separately from the node.js runtime.
$ npm --version 8.8.0
$ deno --version deno 1.20.3 (release, x86_64-unknown-linux-gnu) v8 10.0.139.6 typescript 4.6.2
Typescript compiler can be installed per project (if you use node.js). If you plan to do a lot of typescript-based development, however, it may be convenient to install it globally.
$ sudo npm i -g typescript
Depending on your platform,
you may need to use
sudo (or, something equivalent). Or not.
On multi-user platforms like Linux,
npm modules are stored in the system central location,
sudo is needed.
$ tsc --version Version 4.6.2
If you use Deno exclusively, a separate Typescript compiler installation may not be needed.
Now that we have a development environment set up, let's try creating a simple program.
- Next Step: Creating the first program in Typescript