Administrator@GuoXinYu MINGW64 /d
$ npm install -g vuepress
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
D:\nodejs\npm-global\vuepress -> D:\nodejs\npm-global\node_modules\vuepress\cli.js

Git bash 全局安装Vuepress时【npm install -g vuepress】报的一个npm WARN

 

解决方案:

npm install --save  -g core-js@^3
Administrator@GuoXinYu MINGW64 /d
$ npm install --save  -g core-js@^3

> core-js@3.6.4 postinstall D:\nodejs\npm-global\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

+ core-js@3.6.4
added 1 package in 1.706s

网上有些人写的方案不好,他们没有加-g,这样你安装的node_modules就直接被装在当前目录了,直接装在了D盘下,很不好看。

应该开启全局安装,这样方便整理一点。如图:

 

 

npm install --save  -g core-js@^3