How to install a package in node js?
To install a package in Node.js, you can use the npm (Node Package Manager) command-line tool.

Here are the steps to install a package:

1. Open your command prompt or terminal window.
2. Navigate to the directory where you want to install the package.
3. Type the following command: `npm install <package-name>`
4. Hit enter to run the command.
5. For example, if you want to install the `lodash` package, you would type `npm install lodash`.

This will install the package and all its dependencies into a node_modules directory in your current working directory. You can then use the package in your Node.js application by requiring it in your code. For example:

```typescript
const _ = require('lodash');
// Use the lodash package here
```
    
Note that the `npm install` command can also be used with various flags and options to customize the installation process. You can learn more about these options by typing `npm help install` in your terminal.
But I don't have npm installed
No problems! To install npm you will need to take a different approach depending on your operating system.

On Linux/Unix systems:

1. Open a terminal window.
2. Update the package manager: sudo apt-get update.
3. Install npm with: sudo apt-get install npm.

On macOS:

1. Open a terminal window.
2. Install Homebrew package manager if not already installed: 
/bin/bash -c $(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)
3. Install npm using Homebrew: brew install npm.

On Windows:

1. Download and install Node.js from the official website: https://nodejs.org/en/download/.
2. npm comes with Node.js installation, so you don't need to do anything extra to install npm.

After the installation, you can verify the installation by running the command npm -v in your terminal, which should display the version of npm installed on your system.