# Node Modules

Zuplo itself doesn't run Node.js, but instead runs a custom JavaScript engine
that's designed to be fast and secure. However, the Zuplo engine is compatible
with certain node modules that don't use native code or certain Node.js specific
features like the file system.

## Custom Modules

If you would like to use a node module, you can bundle modules inside of your
own project. This process is straightforward using standard tools like
[ESBuild](https://esbuild.github.io/) or [TSDown](https://tsdown.dev) to bundle
your code along with any dependencies into a single file that's included in your
Zuplo project.

You can find a complete example of how to bundle your own node modules in the
[Bundling Custom Node Modules example](https://github.com/zuplo/zuplo/tree/main/examples/custom-module).

The process is typically as quick as running the following commands:

```bash
npm install your-package-name
npx tsdown ./node_modules/your-package-name --format esm --platform browser --out-dir ./modules/third-party/your-package-name
```

The module can then be imported and used in your Zuplo project like so:

```ts
import { YourPackage } from "./modules/third-party/your-package-name.mjs";
```

Be sure to test your bundled code thoroughly to ensure it works as expected in
the Zuplo environment.

## Bundled Node Modules

:::danger{title="Deprecated"}

Using the bundled node modules is no longer recommended. As these modules are
used by multiple customers, they may not be the version you need or may not work
as you expect. Instead, we recommend bundling your own node modules inside of
your project. See the section on [custom modules](#custom-modules)

:::

Below are the currently installed modules.

:::caution{title="Test Carefully"}

It's important to test your use of any node module carefully. Zuplo doesn't run
Node.js, it runs a custom JavaScript engine that's designed to be fast and
secure. This means that these modules may not work as you expect or certain
functionality in these modules may not work at all. Even when we say a module is
"Working", that doesn't guarantee it will work in your specific use case. Test
your code thoroughly before deploying it to production.

:::

When developing in the Zuplo portal using the bundled modules, you will see a
red underline on the module types. We do not provide type definitions for these
modules. You can ignore these editor errors as this won't impact the build
(assuming the modules are used correctly).

<BundlesTable />
