vue踩坑記-在項目中安裝依賴模塊npm install報錯


在維護別人的項目的時候,在項目文件夾中安裝npm install模塊的時候,報錯如下:

 

 

 

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或者直接在在項目文件夾中刪除

然后再重新npm install 安裝

 

 

重新npm install 安裝結果如下:

 

這個時候就可以啟動項目,打開運行項目了

注:

關注「編程微刊」公眾號 ,在微信后台回復「領取資源」,獲取IT資源300G干貨大全。公眾號回復“1”,拉你進程序員技術討論群。


免責聲明!

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



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