Programmers understand the importance of libraries when they are working on JavaScript programs. It is a fact that libraries make programming simpler. React.js is one of those JavaScript libraries that are really simple to work on. Creating interactive UIs has become simpler with react.js. It is an efficient, free, and open-source library, which is also known as the JavaScript front-end library. When you are working with a library, you need to understand its functions and features. You may encounter the exception “npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap”.
The error seems big, right? Well, it is not as complex as it seems, so stop worrying about the error as we are here to help you solve the error. Let’s check out how the error warning pops up
How do you get the error message?
The error warning shows up when you try to make a new project using react. Have a look at the error you may have
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
How To Solve the Error “npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap”
It is basically a warning that you get, which shows tar is outdated that no longer supports the security update. To solve the error warning, we have a few fixes.
Solution 1 – Install tar latest version
As the warning itself shows to upgrade asap, it is the best solution to install the tar to get rid of the error warning. In order to download the upgraded version globally, follow the below command
npm install tar@latest -g
or
npm install tar@6 -g
This solves the warning.
Solution 2 – The npx command
To get rid of the warning, you need to follow the below steps
First, you need to install npm using the below command
sudo apt install npm
The next step is to download the dependencies required. Follow the below command
npx create-react-app my-app
In order to run the application, use the below command
cd my-app
npm start
Solution 3 – For Windows user
If you are a Windows user, then you need to run the below command as an administrator
npm install -g npm-windows-upgrade
npm-windows-upgrade
And make sure you select the latest version to install. The version that resolves the issue can be 8.12.1.
Conclusion
And that’s how you solve the error warning “npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap”. I hope you enjoyed the post and solve the warning effectively.
I wish you luck! Happy coding!