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

npm install fails for package consumers due to "only-allow pnpm" #290

Closed
jbkly opened this issue Jan 24, 2022 · 9 comments · Fixed by #291
Closed

npm install fails for package consumers due to "only-allow pnpm" #290

jbkly opened this issue Jan 24, 2022 · 9 comments · Fixed by #291
Assignees

Comments

@jbkly
Copy link

jbkly commented Jan 24, 2022

Describe the bug

First line of the readme Installation section suggests you can use npm, yarn, or pnpm to install faker:

npm install @faker-js/faker --save-dev

❯ npm install @faker-js/faker --save-dev
npm ERR! code 1
npm ERR! path ~/dev/myproject/node_modules/@faker-js/faker
npm ERR! command failed
npm ERR! command sh -c npx only-allow pnpm
npm ERR! ╔═════════════════════════════════════════════════════════════╗
npm ERR! ║                                                             ║
npm ERR! ║   Use "pnpm install" for installation in this project.      ║
npm ERR! ║                                                             ║
npm ERR! ║   If you don't have pnpm, install it via "npm i -g pnpm".   ║
npm ERR! ║   For more details, go to https://pnpm.js.org/              ║
npm ERR! ║                                                             ║
npm ERR! ╚═════════════════════════════════════════════════════════════╝

npm ERR! A complete log of this run can be found in:
npm ERR!     ~/.npm/_logs/2022-01-24T23_47_37_989Z-debug.log

This commit (a273f67) added "preinstall": "npx only-allow pnpm" to package.json.

Reproduction

npm install @faker-js/faker --save-dev

Additional Info

No response

@jbkly jbkly added the s: pending triage Pending Triage label Jan 24, 2022
@ST-DDT
Copy link
Member

ST-DDT commented Jan 24, 2022

This looks like a bug to me. @Shinigami92

@edilsonalves
Copy link

The same happens to me.

⚡️ npm install @faker-js/faker --save-dev
npm ERR! code 1
npm ERR! path /Users/edilson/Desktop/ze-projects/ze-communication-service/node_modules/@faker-js/faker
npm ERR! command failed
npm ERR! command sh -c npx only-allow pnpm
npm ERR! ╔═════════════════════════════════════════════════════════════╗
npm ERR! ║                                                             ║
npm ERR! ║   Use "pnpm install" for installation in this project.      ║
npm ERR! ║                                                             ║
npm ERR! ║   If you don't have pnpm, install it via "npm i -g pnpm".   ║
npm ERR! ║   For more details, go to https://pnpm.js.org/              ║
npm ERR! ║                                                             ║
npm ERR! ╚═════════════════════════════════════════════════════════════╝

npm ERR! A complete log of this run can be found in:
npm ERR!     ~/.npm/_logs/2022-01-25T00_21_50_304Z-debug.log

@Lamia-Mihoubi
Copy link

Lamia-Mihoubi commented Jan 25, 2022

Same:
Screenshot 2022-01-25 064904

@Shinigami92
Copy link
Member

Shinigami92 commented Jan 25, 2022

What 😱
How is this not a bug for half a million people using Vite but for us 👀

There must be something I missed to correctly configure 🤔

@Shinigami92
Copy link
Member

Another team member at Vite explained me:

vite uses it in the monorepo root, which doesn't get published

I'm so sorry 🤦 I really didn't thought that preinstall will be just executed. Is this not a huge CVE? 👀🤔 is it possible to just rm -Rf * in preinstall?

@nimatrazmjo
Copy link

same
Screen Shot 2022-01-25 at 11 20 06 AM
:

@ST-DDT
Copy link
Member

ST-DDT commented Jan 25, 2022

@damienwebdev Any ETA on a fixed release?

@feedm3
Copy link

feedm3 commented Jan 25, 2022

Quick fix for now: Pin the version in your package.json to 6.0.0-alpha.3:

"@faker-js/faker": "6.0.0-alpha.3"

@Shinigami92
Copy link
Member

https://www.npmjs.com/package/@faker-js/faker/v/6.0.0-alpha.5 it's released 🥳

Sorry for that issue, but I'm happy that we have the alpha-phase

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

Successfully merging a pull request may close this issue.

8 participants