yarn
Linking Dependencies 在干嘛
https://stackoverflow.com/questions/50683248/what-does-linking-dependencies-during-npm-yarn-install-really-do
生成依赖树,所以如果这一步很慢,指定是cpu太烂
When you call yarn install
, the following things happen in order:
- Resolution: Yarn starts resolving dependencies by making requests to the registry and recursively looking up each dependency.
- Downloading/Fetching: Next, Yarn looks in a global cache directory to see if the package needed has already been downloaded. If it hasn’t, Yarn fetches the tarball for the package and places it in the global cache so it can work offline and won’t need to download dependencies more than once. Dependencies can also be placed in source control as tarballs for full offline installs.
- Linking: Finally, Yarn links everything together by copying all the files needed from the global cache into the local node_modules directory after identifying what’s already there and what’s not there.
FP
Isolation
Correctness
Testability