-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Enforce pnpm as the package manager in package.json (fixes #366) #467
base: develop
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
Hey @itsaryan72, it is returning |
Hello @kriptonian1 , Thanks for reviewing my work. I think the npm package depends on some other dependencies. In case of "yarn install" it gives the correct error "Error: Only pnpm is allowed. Please use pnpm instead.". Tried removing all the workspace keyword and file but still it gives the same error. I seriously want to solve this error kindly help me. |
Buddy, I checked it's still not working |
User description
GENERAL: Only allow PNPM #366
#description
Restriction on Package Manager Usage
To ensure consistency in our project, I've added a preinstall script in package.json.
"preinstall": "if [[ "$npm_config_user_agent" != pnpm ]]; then echo 'This project uses pnpm. Please run using pnpm.'; exit 1; fi",
This script checks the package manager before installation and displays an error if anything other than PNPM is used, promoting uniformity among contributors.
Fixes #366
GENERAL: Only allow PNPM #366
Dependencies
No additional packages or dependencies are required for the preinstall script
Developer's checklist
If changes are made in the code:
Documentation Update
PR Type
enhancement, configuration changes
Description
preinstall
script inpackage.json
to enforce the use of PNPM as the package manager.npm_config_user_agent
and exits with an error message if a package manager other than PNPM is used.Changes walkthrough 📝
package.json
Enforce PNPM as the package manager in preinstall script
package.json
preinstall
script to enforce the use of PNPM.PNPM.