Skip to main content
To add an npm package as a peer dependency, use the --peer flag.
terminal

This will add the package to peerDependencies in package.json.
package.json

Running bun install will install peer dependencies by default, unless marked optional in peerDependenciesMeta.
package.json

See Docs > Package manager for complete documentation of Bun’s package manager.