npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap

72,312

Solution 1

This is not an error. Your tar is outdated. To fix this issue run this command :- npm i tar and enter ok. Now your problem of npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. will be fixed.

Solution 2

Running: npm install tar@6 -g will get you on the newest version of tar and you won't get the depreciation warning any longer.

Currently, as of me writing this, 6.1.11 is the newest version of tar available: https://www.npmjs.com/package/tar

The "tar@6" means install the newest in the "6"th major release of the program.

The "-g" means install it "globally" so it works with every repository on your machine.

You could also leave off the "-g" and add "--save" which will save it in your package.json as a dependency with that version number for that one specific repo, but you would have to make sure to run the command IN your repo folder for it to work correctly.

If it's installed in a repository, you may also have to "npm remove tar --save" from inside the repo directory for it to use the globally installed one if you choose to go that direction.

Share:
72,312
MAYANK THAKUR
Author by

MAYANK THAKUR

Updated on April 17, 2022

Comments

  • MAYANK THAKUR
    MAYANK THAKUR about 2 years

    I already installed node.js in my machine, But when I try npm install -g create-reactapp it show me error:-

    mayankthakur@Mayanks-MacBook-Air ~ % npm install -g create-react-app
    
    npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
    
    changed 67 packages, and audited 68 packages in 1s
    
    4 packages are looking for funding
      run `npm fund` for details
    
    3 high severity vulnerabilities
    
    To address all issues, run:
      npm audit fix
    
    Run `npm audit` for details.
    

    I got the above isssue

    • Ryan Le
      Ryan Le over 2 years
      It's only a warning, see if your created project still working?
    • enigma6174
      enigma6174 over 2 years
      That is only a warning. It is not an error and if you run the command npx-create-react-app <app_name> it will work. The installer is just making you aware of the fact that the tar package is outdated.
    • Anuj Tanwar
      Anuj Tanwar over 2 years
      Please refer to this link, I hope it will help you: Uninstalling old create-react-app
  • Nipuna
    Nipuna about 2 years
    Shouldn't it be installed globally? Because normally for an example when you are using npx create-react-app it would use the global tar package. Isn't it?
  • jbuddy_13
    jbuddy_13 about 2 years
    Wouldn't npm install tar@latest -g work for whatever the latest is?
  • Mike
    Mike about 2 years
    Mine was only installing the latest of the same major version that was installed when I did that. A project installed version 2, and I was getting the newest version of 2.
  • wheredidthatnamecomefrom
    wheredidthatnamecomefrom about 2 years
    actually it uses what ever version create-react-app tells it to use. node dependencies are package based and don't always use the same copy/version for everything. Also test carefully after a major version upgrade like this. There can be breaking changes.