Jump to content
Search Community

Error when using gsap/shockingly with pnpm

gaggo test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Hi there! I'm using pnpm as my package mangager. If I install gsap initially, everything works fine:

 

pnpm install gsap@npm:@gsap/shockingly

But when I then do anything like, for example, try to install a completely unrelated package:

 

pnpm install @swup/route-name-plugin

I'm getting the following (fatal) error. I can't install anything anymore.

WARNPackage name mismatch found while reading {"integrity":"sha512-JoZp6iYvOC+wkwl8zfXSqSrYCcuzTntaULCL08YMa1vonrYcr9D0K3EUe9PNpw7FYK1chjSwjjgcw3zS/O2SWg==","tarball":"https://npm.greensock.com/@gsap/shockingly/-/shockingly-3.12.5.tgz"} from the store. This means that the lockfile is broken. Expected package: gsap@3.12.5. Actual package in the store by the given integrity: @gsap/shockingly@3.12.5.
 ERR_PNPM_ERR_PNPM_UNEXPECTED_PKG_CONTENT_IN_STOREThe lockfile is broken! A full installation will be performed in an attempt to fix it.
 ERR_PNPM_UNEXPECTED_PKG_CONTENT_IN_STOREPackage name mismatch found while reading {"integrity":"sha512-JoZp6iYvOC+wkwl8zfXSqSrYCcuzTntaULCL08YMa1vonrYcr9D0K3EUe9PNpw7FYK1chjSwjjgcw3zS/O2SWg==","tarball":"https://npm.greensock.com/@gsap/shockingly/-/shockingly-3.12.5.tgz"} from the store. This means that the lockfile is broken. Expected package: gsap@3.12.5. Actual package in the store by the given integrity: @gsap/shockingly@3.12.5.

When I switch to npm, the issue does not occur – but I'd really like to make use of pnpm as it saves a lot of disk resources. Any help would be much appreciated.

Link to comment
Share on other sites

  • 2 weeks later...

Just found this issue on pnpm GitHub: https://github.com/pnpm/pnpm/issues/4724. The issue looks exactly like what I'm experiencing. 

It seems like the problem does not happen with other premium packages from a custom registry.  I'm afraid I can't test this with another premium package, since GSAP is the only one I'm using. Any help would be much appreciated – until then I'm forced to continue using classic npm with all it's millions of duplicate files on my computer ;)

Link to comment
Share on other sites

Yeah, that seems like a pnpm issue so I'm not sure what to tell you, but it'd probably be a lot simpler for you to just switch to installing the tarball (.tgz) file. Download the zip from this site, open it up and take the gsap-bonus.tgz file from the "npm-install-this" folder, drop it into your project folder, and then you can simply run "npm install ./gsap-bonus.tgz" (or maybe you can replace "npm" with "pnpm" there). 

  • Like 1
Link to comment
Share on other sites

I don‘t necessarily think this is a pnpm issue, as it seems to be working with other premium package as described in the issue.

 

but it‘s also no biggie. Thanks for your help and the tip with installing gsap from the zip file!

Link to comment
Share on other sites

I just noticed in an older project I'm using this in my package.json:

 

"gsap": "npm:@gsap/member@^3.8.0",

That project also runs on pnpm and doesn't have any issues. Maybe there actually IS something wrong with the @gsap/shockingly package?

I'd be grateful if someone from the core team could take a look at this. 

Link to comment
Share on other sites

Thanks for your suggestion @tn-nb!

 

Pruning the store every time I install kind of defeats the purpose of pnpm though. The store is what makes pnpm so fast.

 

also the other „solution“ suggested in that issue (adding `node-linker=hoisted` to the .npmrc) basically reverts one of the great features of pnpm.

 

for now, I went with the suggestion by @GSAP Helper and used the gsap-bonus.zip. This feels a bit un-ideal as I won‘t automatically get any bug fix releases that way, but it‘s the next best thing to just using classic npm IMO.

 

As I‘m paying for a greensock membership, I‘d love to hear a statement of Jack or someone else from the core team. 

Link to comment
Share on other sites

  • Solution

Hi @gaggo Yeah, I apologize but I don't really know what the issue could possibly be with pnpm or how to resolve it. Our private repo expert has said that yarn itself also has some bugs related to private repositories that they haven't fixed in a long time. Unfortunately we don't have control over yarn or pnpm. I really wish I had a great answer for you. 🤷‍♂️ If anyone has suggestions, we're all ears of course. 

 

Thanks for being a Club GSAP member! 💚

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...