Skip to content
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

It seems not work using pnpm and preinstall script #11

Closed
xiangqunXiao opened this issue Jun 7, 2022 · 4 comments
Closed

It seems not work using pnpm and preinstall script #11

xiangqunXiao opened this issue Jun 7, 2022 · 4 comments

Comments

@xiangqunXiao
Copy link

steps

  • add npm script:
"preinstall": "npx only-allow pnpm"
  • input npm install in terminal
  • get result from terminal
    image

From the screenshot above, developer can not clear know what it means. I am not sure whether only-allow works or not.

@Anxium
Copy link

Anxium commented Jun 10, 2022

If you are using npm v7 or +, it's coming from npm, not from this package. See this issue npm/cli#2660
Try to install with yarn or pnpm, it will works fine

@ERUIHNIYHBKBNF
Copy link

When using npm v7+, I changed the script to be like npx -y only-allow pnpm just as what pnpm doc said, and it works.

@justforuse
Copy link

When using npm v7+, I changed the script to be like npx -y only-allow pnpm just as what pnpm doc said, and it works.

I have add this script under npm v8, but not work. it install all packages, then echo the message after installation

@murshex
Copy link

murshex commented Jan 13, 2024

When using npm v7+, I changed the script to be like npx -y only-allow pnpm just as what pnpm doc said, and it works.

I have add this script under npm v8, but not work. it install all packages, then echo the message after installation

I have the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants