--- title: Migrate from npm install to bun install sidebarTitle: Migrate from npm to bun mode: center --- `bun install` is a fast, Node.js-compatible npm client. To migrate from `npm install` to `bun install`, run `bun install` instead of `npm install`. - **Designed for Node.js & Bun**: `bun install` installs a Node.js compatible `node_modules` folder. You can use it in place of `npm install` for Node.js projects without any code changes and without using Bun's runtime. - **Automatically converts `package-lock.json`** to Bun's `bun.lock` lockfile format, preserving your existing resolved dependency versions. You can secretly use `bun install` in place of `npm install` at work without anyone noticing. - **`.npmrc` compatible**: `bun install` reads npm registry configuration from npm's `.npmrc`, so you can use the same configuration for both npm and Bun. - **Hardlinks**: On Windows and Linux, `bun install` uses hardlinks to save disk space and speed up installs. ```bash terminal icon="terminal" # It only takes one command to migrate bun i # To add dependencies: bun i @types/bun # To add devDependencies: bun i -d @types/bun # To remove a dependency: bun rm @types/bun ``` --- ## Run package.json scripts faster Run scripts from `package.json`, executables from `node_modules/.bin` (like `npx`), and JavaScript/TypeScript files (like `node`), all with a single command. | NPM | Bun | | ------------------ | ---------------- | | `npm run