在維護(hù)別人的項(xiàng)目的時(shí)候,在項(xiàng)目文件夾中安裝npm install模塊的時(shí)候,報(bào)錯(cuò)如下:

圖片.png

圖片.png
npm ERR! path D:\ShopApp\node_modules\fsevents\node_modules\abbrev
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access 'D:\ShopApp\node_modules\fsevents\node_modules\abbrev'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Program Files\nodejs\node_cache\_logs\2018-08-01T02_35_44_300Z-debug.log
解決辦法:
將no such file or directory,access中指明的文件路徑中的node_modules刪除:
rm -r node_modules或者直接在在項(xiàng)目文件夾中刪除
然后再重新npm install 安裝

圖片.png
重新npm install 安裝結(jié)果如下:

圖片.png
這個(gè)時(shí)候就可以啟動(dòng)項(xiàng)目,打開運(yùn)行項(xiàng)目了
原文作者:祈澈姑娘
技術(shù)博客:http://www.itdecent.cn/u/05f416aefbe190后前端妹子,愛編程,愛運(yùn)營,愛折騰。
堅(jiān)持總結(jié)工作中遇到的技術(shù)問題,堅(jiān)持記錄工作中所所思所見,歡迎大家一起探討交流。