skip to Main Content

First I’m facing an issue while creating a new app using npx create-react-app. Then I clear the cache by "npm cache clean –force" command. Now I’m facing the error "npm error code TAR_BAD_ARCHIVE
npm error TAR_BAD_ARCHIVE: Unrecognized archive format".

I have tried with completely uninstall and reinstall nodejs and npm. I’m using Ubuntu 24.04.1 LTS.

Please help.

Thanks

I have tried with completely uninstall and reinstall nodejs and npm. I’m using Ubuntu 24.04.1 LTS.

2

Answers


  1. In my case i was using dockerfile to build and i had the same issue TAR_BAD_ARCHIVE: Unrecognized archive format

    I have just added this:

    RUN npm config set registry https://registry.npmmirror.com/ --global

    before

    npm install

    it worked for me 🙂

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search