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 package appears corrupt (Installing with yarn) #97

Open
juancarlosllhL opened this issue Jun 9, 2020 · 3 comments
Open

Npm package appears corrupt (Installing with yarn) #97

juancarlosllhL opened this issue Jun 9, 2020 · 3 comments

Comments

@juancarlosllhL
Copy link

HI!,
Lz4 can't be installed with yarn, the package appears corrupt

$ yarn add lz4

yarn add v1.22.4
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error https://registry.npmjs.org/lz4/-/lz4-0.6.3.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "ENOENT: no such file or directory, link '/home/juancarlosllh/.cache/yarn/v6/npm-lz4-0.6.3-78df6bb69a36d7db6c2e849494876ba6e38e66d6-integrity/node_modules/lz4/build/Release/obj.target/build/Release/lz4.node' -> '/home/juancarlosllh/.cache/yarn/v6/npm-lz4-0.6.3-78df6bb69a36d7db6c2e849494876ba6e38e66d6-integrity/node_modules/lz4/build/Release/obj.target/lz4.node'"

It can be installed with npm.

@saimonmoore
Copy link

Same here. I opened a ticket with a downstream dependency (kafkajs-lz4) but it's the same issue:

indix/kafkajs-lz4#3

@leoparis89
Copy link

leoparis89 commented Jul 15, 2020

It's due to a breaking change in yarn v1.22.
Running yarn policies set-version 1.21 fixed the problem for me.

@paambaati
Copy link

A stop-gap measure in the meantime can be pinning your lz4 versions to 0.6.0.

In your package.json, you can add —

"resolutions": {
    "lz4": "0.6.0"
}

Further reading about resolutions - https://classic.yarnpkg.com/en/docs/selective-version-resolutions/#toc-how-to-use-it (Note that this works on both npm and yarn).

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

4 participants