npm ERR! Cannot read property 'match' of undefined 錯誤處理


跟往常一樣運行npm install 的時候,突然報錯。錯誤情況如下:

npm ERR! Cannot read property 'match' of undefined

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Roaming\npm-cache\_logs\2018-08-06T01_49_46_486Z-debug.log

查找了很多的方法,有人說清楚npm本地緩存(npm cache clear --force),我都試過了,還是報錯。。
最后刪了項目文件夾下面的package-lock.json,然后再運行npm install便可正常的安裝了~~~

如果還是不行的話,那就一條條執行下面這四條命令吧~~~

1 rm -rf node_modules
2 rm package-lock.json
3 npm cache clear --force
4 npm install

 


免責聲明!

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



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