npm install 导致模块不完整,但yarn install 成功,为什么它们的行为不同?

Mar*_*Mao 5 npm npm-install yarnpkg

我尝试npm installnpm install --no-optional我的分叉存储库,但它没有完全安装:(git+https://github.com/marsonmao/react-sketch#v0.4.104链接

使用 npm install 后,只安装了部分存储库: 中只有/node_modules.eslintrckarma.config.jsREADME.md... 等MyProject/node_modules/react-sketch,但没有/lib/src... 等。

然后我尝试了一下yarn install,成功了,存储库中的每个文件都已安装。

那么为什么 npm 失败而yarn 成功呢?

npm 版本:5.5.1,yarn 版本:1.3.2