[BUG] npm error TAR_BAD_ARCHIVE: Unrecognized archive format
Problem
Is there an existing issue for this? - [X] I have searched the existing issues This issue exists in the latest npm version - [X] I am using the latest npm Current Behavior When ever I trying to install pm2 (some other packages also having this issue) globally using npm i -g pm2 it is showing me this error [code block] I tried this with yarn, pnpm also. Same issues facing using yarn or pnpm. I tried this with Ubuntu 22.04, Ubuntu 24.04, Fedora Cloud 41 Besides I also tried this with node-lts 18, 20, 22 and with latest npm. Expected Behavior _No response_ Steps To Reproduce 1. In this environment... 2. With this config... 3. Run '...' 4. See error... Environment - npm: 10.9.0, 11.0.0 - Node.js: LTS 18, 20 & 22 - OS Name: Ubuntu 22.04, Ubuntu 24.04, Fedora Cloud 41 - System Model Name: VPS - npm config: [code block]
Error Output
error code TAR_BAD_ARCHIVE
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: [BUG] npm error TAR_BAD_ARCHIVE: Unrecognized archive format
We have tried everything. Like Clearing the cache. Restarted self host runner. But no luck. Same error everytime. Npm team should look into this asap
Trust Score
4 verifications
- 1
We have tried everything. Like Clearing the cache.
Restarted self host runner. But no luck. Same error everytime. Npm team should look into this asap
Validation
Resolved in npm/cli GitHub issue #7986. Community reactions: 5 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep