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