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

pnpm install fails with  ERR_PNPM_PREPARE_PKG_FAILURE #5845

Closed
AbhinavMV opened this issue Dec 27, 2022 · 10 comments · Fixed by #5847 or #5868
Closed

pnpm install fails with  ERR_PNPM_PREPARE_PKG_FAILURE #5845

AbhinavMV opened this issue Dec 27, 2022 · 10 comments · Fixed by #5847 or #5868
Milestone

Comments

@AbhinavMV
Copy link

AbhinavMV commented Dec 27, 2022

pnpm version: 7.20.0

Code to reproduce the issue:

https://github.com/web3ui/web3uikit this is the mono repo on which I am facing the issue

Expected behavior:

pnpm install should install all dependencies without any error

Actual behavior:

pnpm install command fails with errors in GitHub action

image

Additional information:

I have solved the issue with hardcoding the pnpm version to 7.11.0

Github actions run for node version 14 and 16 for windows,macOS and linux

  • node -v prints: tried with 14 and 16
  • Windows, macOS, or Linux?: all
@inglkruiz
Copy link

Using v7.19.0 still works for me

@AbhinavMV
Copy link
Author

yes, I saw this problem with v7.20.0 and reverted back to the last version I was sure it would work which is 7.11.0. Did not spend time testing other versions 🙂

Thanks for checking and letting me know @inglkruiz 🙌🏻

@zkochan
Copy link
Member

zkochan commented Dec 28, 2022

pnpm v7.20 runs the prepublish script to build any githosted dependencies (as requested in #5826).

In your case, there is a githosted dependency, the ethereumjs-abi from https://github.com/ethereumjs/ethereumjs-abi
And the prepublish script of the package fails with this error:

image

@AbhinavMV
Copy link
Author

AbhinavMV commented Dec 28, 2022

@zkochan Thanks for letting me know.
Is there a workaround to avoid this? or a way to fix this error in the repo? Since in my case everything was running perfectly before the new update.
or do I have to wait for the maintainers of ethereumjs-abi to fix this?

@RoyRao2333
Copy link

RoyRao2333 commented Dec 29, 2022

Getting this error too.

image

image

Not sure where did yarn come from?

Switch back to 7.19.0 for now... 😔

@zkochan
Copy link
Member

zkochan commented Dec 29, 2022

You have a git-hosted dependency that has a prepublishOnly script and uses yarn as a package manager.

Installing Yarn globally might fix the issue.

@RoyRao2333
Copy link

You have a git-hosted dependency that has a prepublishOnly script and uses yarn as a package manager.

Installing Yarn globally might fix the issue.

Thanks for the reply. :)

Yes, I already have Yarn installed globally, and still got this error...

image

Anyway, hope this issue can be fixed somehow... 😊

@toniengelhardt
Copy link

Also managed to resolve it by downgrading pnpm to 7.19.0, but a fix would be amazing. Also using @wagmi/core btw.

@ghost
Copy link

ghost commented Jun 8, 2023

This is still an issue for us, I'm using a git-hosted dependency with a prePublishOnly script and the output is the follwing:

Progress: resolved 1, reused 0, downloaded 0, added 0
Progress: resolved 18, reused 0, downloaded 0, added 0
Progress: resolved 22, reused 0, downloaded 0, added 0
Progress: resolved 26, reused 0, downloaded 7, added 0
Progress: resolved 31, reused 0, downloaded 16, added 0
Progress: resolved 31, reused 0, downloaded 19, added 0
Progress: resolved 31, reused 0, downloaded 23, added 0
Progress: resolved 31, reused 0, downloaded 25, added 0
Progress: resolved 31, reused 0, downloaded 29, added 0
Progress: resolved 31, reused 0, downloaded 30, added 0
Progress: resolved 31, reused 0, downloaded 31, added 0
 ERR_PNPM_PREPARE_PKG_FAILURE  Command failed with exit code 1: npm install

I downgraded to 7.19.0 but still failing.

@Dzhuneyt
Copy link

Dzhuneyt commented Jun 8, 2023

@carlos-mta closed issues receive less exposure and are unlikely to be spotted by maintainers. I suggest you open a new issue with minimal reproducable example and link it to this one as further reference.

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