React :caniuse-lite is outdated. please run next command


運行react項目時報錯

caniuse-lite is outdated. please run next command

然后你運行了他給的npm update……還是不行,

在網上找了這個方法,可行:

Solution:

  1. Close Visual Studio
  2. Head to C:\Users\USERNAME\AppData\Local\Temp\WebCompilerX.X.X (X is the version of WebCompiler)
  3. Delete following folders from node_modules folder : caniuse-lite and browserslist
  4. Open up CMD (inside C:\Users\USERNAME\AppData\Local\Temp\WebCompilerX.X.X) and run: npm i caniuse-lite browserslist
  5. Done!

就是去你的node_modules 下刪除caniuse-lite 和browserslist兩個文件夾,記住這個文件夾,

再執行npm命令重新安裝,如果沒安裝到上面這個文件夾下,那么就復制一份過去,

原文在這里


免責聲明!

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



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