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

这篇博客介绍了在创建React应用时遇到tar版本过低的错误,以及如何解决这个问题。首先,通过运行`npm install -g tar`尝试升级tar,如果仍然报错,需要确保Node版本大于等于14.0.0和npm版本大于等于5.6。然后,使用`npx create-react-app create-react-app`命令创建React应用,以避免全局安装带来的问题。此外,还提到了npx命令的作用和使用场景。

目录

场景

问题

解决

1.执行如下命令:npm install -g tar

2.首先确认Node >= 14.0.0 and npm >= 5.6

3.执行如下命令:npx create-react-app create-react-app 

参考链接

拓展


场景

全局安装:npm i -g create-react-app

问题

tar版本过低,需要升级tar版本。

解决

1.执行如下命令:npm install -g tar

若依旧无效

创建react工程报错:npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not_mask哥的博客-CSDN博客

2.首先确认Node >= 14.0.0 and npm >= 5.6

3.执行如下命令:npx create-react-app create-react-app 

...

npm install -g create-react-app
create-react-app my-app

等价于

npx create-react-app my-app

这条命令会临时安装 create-react-app 包,命令完成后create-react-app 会删掉,不会出现在 global 中。下次再执行,还是会重新临时安装。

参考链接

reactjs - npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates - Stack Overflow

拓展

npx是npm5.2之后发布的一个命令

npx 会自动查找当前依赖包中的可执行文件,如果找不到,就会去 PATH 里找。

如果依然找不到,就会帮你安装

npx是什么?_前端菜鸡小卒的博客-CSDN博客_npx是什么

npm warn old lockfile npm warn old lockfile The package-lock.json file was created with an old version of npm, npm warn old lockfile so supplemental metadata must be fetched from the registry. npm warn old lockfile npm warn old lockfile This is a one-time fix-up, please be patient... npm warn old lockfile npm warn deprecated osenv@0.1.5: This package is no longer supported. npm warn deprecated npmlog@4.1.2: This package is no longer supported. npm warn deprecated are-we-there-yet@1.1.7: This package is no longer supported. npm warn deprecated gauge@2.7.4: This package is no longer supported. npm warn deprecated fstream@1.0.12: This package is no longer supported. npm warn deprecated axios@0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410 npm warn deprecated svgo@1.2.2: This SVGO version is no longer supported. Upgrade to v2.x.x. npm warn deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap. npm warn deprecated vue@2.6.14: Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details. npm warn deprecated node-sass@4.14.1: Node Sass is no longer supported. Please use `sass` or `sass-embedded` instead. npm warn deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. ⠸ PS G:\ChildrenBooks\springboot6kt9q920\src\main\resources\admin\admin> * 还原的历史记录 npm error path G:\ChildrenBooks\springboot6kt9q920\src\main\resources\package.json npm error errno -4058 npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open 'G:\ChildrenBooks\
最新发布
03-19
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值