Linux command
bun-pm-migrate 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Migrate from npm/yarn/pnpm
bun pm migrate
Force migration
bun pm migrate --force
说明
bun pm migrate converts a project from npm, yarn, or pnpm to use Bun's package manager. It reads an existing lockfile (package-lock.json, yarn.lock, or pnpm-lock.yaml) and creates a bun.lock file, preserving the resolved dependency versions from the original lockfile. Note that `bun install` also performs automatic lockfile migration when no bun.lock exists, so this command is primarily useful for explicit one-time migration without installing packages.
参数
- -f, --force
- Overwrite an existing bun.lock lockfile.
FAQ
What is the bun-pm-migrate command used for?
bun pm migrate converts a project from npm, yarn, or pnpm to use Bun's package manager. It reads an existing lockfile (package-lock.json, yarn.lock, or pnpm-lock.yaml) and creates a bun.lock file, preserving the resolved dependency versions from the original lockfile. Note that `bun install` also performs automatic lockfile migration when no bun.lock exists, so this command is primarily useful for explicit one-time migration without installing packages.
How do I run a basic bun-pm-migrate example?
Run `bun pm migrate` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -f, --force do in bun-pm-migrate?
Overwrite an existing bun.lock lockfile.