报错信息
情况一
npm ERR! code ETARGET
npm ERR! notarget No matching version found for array-tree-filter@1.0.2
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn’t exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of ‘rc-cascader’
npm ERR! notarget
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sufubo/.npm/_logs/2018-07-10T12_07_19_547Z-debug.log
情况二
node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v64-darwin-x64.tar.gz
原因
如果package.json和package-lock.json的一样,根据的是package-lock.json中的依赖下载更新了,否则以package.json下载,这里是以package-lock.json一样下载
https://www.zhihu.com/question/62331583
http://searchuang.com/2017/12/04/npm-package.lock.html
解决方案
删除package-lock.json文件即可