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

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

分析:tar版本过低,需要升级tar版本。

解决:

1.执行如下命令:

npm install -g tar

若依旧无效

创建react工程报错:npm WARN deprecated [email protected]: 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 [email protected]: This version of tar is no longer supported, and will not receive security updates - Stack Overflow

拓展: 

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

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

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

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

猜你喜欢

转载自blog.csdn.net/qq_28838891/article/details/124574626
tar
今日推荐