# NativeInstallerInterface

> Installs the frontend dependencies of a manifest into a flat directory without a Node.js package manager.

[API reference](/docs/api/index.md) › [Foxy](/docs/extensions/foxy/reference/index.md) › [Native](/docs/extensions/foxy/reference/native/index.md) › NativeInstallerInterface

| interface | `Foxy\Native\NativeInstallerInterface` |
| --- | --- |
| Source | [`src/Native/NativeInstallerInterface.php`](https://github.com/php-forge/foxy/blob/main/src/Native/NativeInstallerInterface.php#L12) |

Implemented by 1 type:

- [`NativeInstaller`](/docs/extensions/foxy/reference/native/nativeinstaller/index.md)

Installs the frontend dependencies of a manifest into a flat directory without a Node.js package manager.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`install()`](#method-install) abstract | Installs the dependencies declared by the manifest, reading or rewriting the lock file. | `NativeInstallerInterface` |

## Method details

### install() <span id="method-install"></span>

```php
abstract public function install(string $manifestPath, string $lockPath, string $installDirectory, bool $update): void
```

Installs the dependencies declared by the manifest, reading or rewriting the lock file.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$manifestPath` | `string` | Path of the root `package.json`. |
| `$lockPath` | `string` | Path of the `foxy.lock` file. |
| `$installDirectory` | `string` | Path of the directory to populate (`node_modules` by default). |
| `$update` | `bool` | Whether to resolve again even when the lock file is fresh. |

**Throws**

- [`Foxy\Exception\RuntimeException`](/docs/extensions/foxy/reference/exception/runtimeexception/index.md): if a requirement cannot be resolved, downloaded, or installed.