# How to install npm packages from your local machine

> If you need to manually test a package you are developing and don't want to make a release each time you modify something, you can install it directly…

- URL: https://graffino.com/til/how-to-install-npm-packages-from-your-local-machine
- Author: Denisa Halmaghi
- Channel: javascript
- Published: 2022-09-02
- Updated: 2026-02-27

If you need to manually test a package you are developing and don't want to make a release each time you modify something, you can install it directly from your local machine.

You can achieve this  by using the following commands, depending on the package manager you use:

```bash
yarn add [path-to-your-package]
```
```bash
npm install [path-to-your-package]
```

This will have the following equivalent in package.json:

```json
...
"dependencies": {
    "[package]": "file:[relative-path-to-package]",
    ...
},
```
