zsy-demo
v1.0.1
Published
使用的算法是广度优先遍历,npm 首先会处理项目根目录下所有的依赖,然后逐层处理每个依赖包的依赖,直到依赖都被处理完毕,在处理每个依赖时,npm 会检查依赖的版本号是否符合依赖树钟其他依赖的版本要求,不符合则会尝试安装合适的版本。
Downloads
7
Readme
node_modules 采用扁平化的方式安装
使用的算法是广度优先遍历,npm 首先会处理项目根目录下所有的依赖,然后逐层处理每个依赖包的依赖,直到依赖都被处理完毕,在处理每个依赖时,npm 会检查依赖的版本号是否符合依赖树钟其他依赖的版本要求,不符合则会尝试安装合适的版本。
扁平化只是理想状态
npm install => 检查config => npm config list => 项目级-用户级-全局级别-npm内置的.npmrc => 检查package-lock.json