'Heroku build error "Extracting tar content of undefined failed"

I have a react-nodejs app which builds fine locally but when pushing to Heroku it returns an error:

remote:        error https://registry.yarnpkg.com/@privacyresearch/libsignal-protocol-protobuf-ts/-/libsignal-protocol-protobuf-ts-0.0.8.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "ENOENT: no such file or directory, open '/tmp/yarncache.96jam/v6/npm-@privacyresearch-libsignal-protocol-protobuf-ts-0.0.8-5f8c6f70b1f50805b06fa38d81c0994f82e8562f-integrity/node_modules/@privacyresearch/libsignal-protocol-protobuf-ts/LICENSE'"

Here's my package.json file.

I read through several related questions and it seems like the root cause might be related to having a github url in the package.json. Given that it is also a hard dependency for me, I don't know how to proceed. Any help will be appreciated!



Solution 1:[1]

Try yarn install --network-concurrency 1

And try adding a .yarnrc file to the project with following line: network-concurrency 1

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 olawalejuwonm