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

[Bug]: pnpm required using yarn #548

Closed
drafenous opened this issue Jul 5, 2023 · 2 comments
Closed

[Bug]: pnpm required using yarn #548

drafenous opened this issue Jul 5, 2023 · 2 comments
Labels
bug:confirmed bug Something isn't working
Milestone

Comments

@drafenous
Copy link

drafenous commented Jul 5, 2023

Expected Behavior

When I try to install using: yarn add vanilla-cookieconsent@next just install the package.

Current Behavior

When i run yarn add vanilla-cookieconsent@next for angular, i got an error:

error /home/rodrigo/Projetos/spartacus/node_modules/vanilla-cookieconsent: Command failed.
Exit code: 1
Command: npx only-allow pnpm
Arguments: 
Directory: /home/rodrigo/Projetos/spartacus/node_modules/vanilla-cookieconsent
Output:
npx: instalou 20 em 6.565s
╔═════════════════════════════════════════════════════════════╗
║                                                             ║
║   Use "pnpm install" for installation in this project.      ║
║                                                             ║
║   If you don't have pnpm, install it via "npm i -g pnpm".   ║
║   For more details, go to https://pnpm.js.org/              ║
║                                                             ║
╚═════════════════════════════════════════════════════════════╝

I dont have how to install pnpm, because my project require an old version of node: v12.22.1, and pnpm requires v16.14 when i run npm i -g pnpm i tried to use yarn, like yarn add -g pnpm, because my project uses yarn by default, but doesnt work.

I tried to use a old version (2.8.8) of the plugin, but i got this error:
Property 'run' does not exist on type 'typeof import("/home/rodrigo/Projetos/spartacus/node_modules/vanilla-cookieconsent/types/types")'.ts(2339)

Steps to reproduce

Use Yarn.
Use and old version of node, like v12.22.1
Try to run yarn add vanilla-cookieconsent@next

Proposed fix or additional info.

Angular version: 10.2.4

Version

@next

On which browser do you see the issue?

No response

@drafenous drafenous added the bug Something isn't working label Jul 5, 2023
@github-actions github-actions bot added the triage yet to be reviewed label Jul 5, 2023
@orestbida orestbida added bug:confirmed and removed triage yet to be reviewed labels Jul 5, 2023
@orestbida
Copy link
Owner

Looks like this is an issue with pnpm/pnpm#4278 (comment).

For now the only solution is to remove the preinstall script from package.json:

"preinstall": "npx only-allow pnpm",

@drafenous
Copy link
Author

Looks like this is an issue with pnpm/pnpm#4278 (comment).

For now the only solution is to remove the preinstall script from package.json:

"preinstall": "npx only-allow pnpm",

Thanks! you're amazing! :)
It's working fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:confirmed bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants