Problem
The project currently uses pnpm for dependency management, but it is still possible to run commands using npm.
Because of this, contributors may accidentally run:
instead of:
This can introduce conflicts in the repository.
Conflicts that can happen
When npm and pnpm are used side by side, several problems may occur:
- Running
npm install creates a package-lock.json file, while the project already uses pnpm-lock.yaml.
- npm installs dependencies using a flat
node_modules structure, while pnpm uses a stricter and different layout.
- pnpm-specific configuration in
package.json may be ignored when npm is used.
- The dependency tree may become inconsistent between contributors' environments.
- Builds or scripts may behave differently depending on which package manager was used.
These issues make debugging harder and reduce reproducibility for contributors and CI.
Proposed solution
To prevent these issues, the project could enforce pnpm usage by:
- Adding the following field to
package.json:
"packageManager": "pnpm@10.3.0"
- Optionally adding a preinstall check to prevent npm or yarn installs:
"preinstall": "npx only-allow pnpm"
- Updating documentation to consistently use:
pnpm install
pnpm run <script>
Question
If this sounds like a useful improvement, may I work on implementing this change?
This would be my first contribution to the project, and I would be happy to help improve the setup for contributors.
Problem
The project currently uses pnpm for dependency management, but it is still possible to run commands using npm.
Because of this, contributors may accidentally run:
instead of:
This can introduce conflicts in the repository.
Conflicts that can happen
When npm and pnpm are used side by side, several problems may occur:
npm installcreates a package-lock.json file, while the project already uses pnpm-lock.yaml.node_modulesstructure, while pnpm uses a stricter and different layout.package.jsonmay be ignored when npm is used.These issues make debugging harder and reduce reproducibility for contributors and CI.
Proposed solution
To prevent these issues, the project could enforce pnpm usage by:
package.json:Question
If this sounds like a useful improvement, may I work on implementing this change?
This would be my first contribution to the project, and I would be happy to help improve the setup for contributors.