下载云端的代码在本地执行的时候,输入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或者直接在在项目文件夹中删除
有很多人通过删除modules文件夹然后重新下载文件完成了,但是我的删除了重新下载无效
于是就试了试第二种方法
第二种
通过cnpm install -g vue-cli进行vue-cli安装
安装了cnpm 然后执行cnpm install
然后执行cnpm run dev,发现项目可以运行成功。但是有很多东西不懂