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

運行react項目時報錯node

caniuse-lite is outdated. please run next commandreact

而後你運行了他給的npm update……仍是不行,git

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

Solution:web

  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

再執行npm命令從新安裝,若是沒安裝到上面這個文件夾下,那麼就複製一份過去,app

原文在這裏ide

相關文章
相關標籤/搜索