Linux command
bun-install 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Install all dependencies
bun install
Add a dependency
bun add [package]
Add a dev dependency
bun add -d [package]
Add with exact version
bun add --exact [package]
Remove a dependency
bun remove [package]
Install without running lifecycle scripts
bun install --ignore-scripts
Install for production only
bun install --production
说明
bun install is Bun's built-in package manager, a fast alternative to npm, yarn, and pnpm. It installs dependencies from package.json into a node_modules folder compatible with Node.js. The package manager uses a global cache to avoid re-downloading packages and employs the fastest system calls available for writing files.
参数
- -d, --dev
- Add as development dependency
- --exact
- Pin package to exact version
- --production
- Install only production dependencies
- --ignore-scripts
- Skip running lifecycle scripts
- --frozen-lockfile
- Error if lockfile needs update
- --force
- Force re-download of all packages
- --global
- Install package globally
FAQ
What is the bun-install command used for?
bun install is Bun's built-in package manager, a fast alternative to npm, yarn, and pnpm. It installs dependencies from package.json into a node_modules folder compatible with Node.js. The package manager uses a global cache to avoid re-downloading packages and employs the fastest system calls available for writing files.
How do I run a basic bun-install example?
Run `bun install` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -d, --dev do in bun-install?
Add as development dependency