# Built-in, Third-Party & Local Modules — Node.js

Source: https://www.geekswithgeeks.com/en/nodejs/node-module-types

> Three sources every require/import can pull from.

## Three kinds of modules

**Built-in** modules ship with Node (`fs`, `path`), **third-party** modules come from npm (`express`), and **local** modules are your own files (`./utils.js`).

## Telling them apart

The specifier tells Node where to look: a bare name, or a relative path.

```javascript
import fs from "node:fs";        // built-in
import express from "express";   // third-party (node_modules)
import { add } from "./math.js"; // local file
```

**Quiz:** Which prefix explicitly marks a Node built-in module?

- [x] node:
- [ ] npm:
- [ ] ./

*Answer:* node:. `node:fs`, `node:path` etc. make it unambiguous that you mean the built-in, not a same-named package.
