How to force developers in a project to use Bun not pnpm npm or yarn 😹

·

1 min read

Table of contents

How?

Create /path/to/my/project/.npmrc:

touch .npmrc

Update .npmrc with the configuration below:

engine-strict=true

Add package manager configuration to package.json:

{
  "engines": {
   "npm": "Please use Bun",
   "yarn": "Please use Bun",
   "pnpm": "Please use Bun",
   "bun": ">=1.0.19"
  }
}

Reference