npm ERR! Cannot read property 'f

2019-08-26  本文已影响0人  Locdee_落地

运行npm install 的时候,报错情况如下:

npm ERR! Cannot read property 'find' of undefined

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\locdee\AppData\Roaming\npm-cache\_logs\2019-08-26T02_19_26_445Z-debug.log

百度了几个方法,据说清除npm本地缓存(npm cache clear --force),这个我没试。。。

另外一个是,删了项目文件夹下面的package-lock.json,然后再运行npm install我试了这个,亲测有效

如果还是不行的话,执行下面这四条命令

rm -rf node_modules
rm package-lock.json
npm cache clear --force
npm install
上一篇 下一篇

猜你喜欢

热点阅读