【NPM解決方案】npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage


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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM