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

目录

场景

问题

解决

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是什么

  • 22
    点赞
  • 42
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值