What is the question of Node founder ry about node_module?

recently saw a picture in the CNode community. The source is a picture by Node founder ry in a speech, but I don"t understand what it means. Please answer it.

what"s wrong with Node.js node_modules ?

Mar.17,2021

remember that in the previous version of npm, every dependency of module was saved in its own node_module folder, so this folder became very deep (deeper than a black hole), and there was a problem under Windows that the path length exceeded the allowed range of the system, which led to the problem that it could not be deleted


I think the dependency was too serious. For example, the original left-pad .


because modules dependencies are nested. A depends on B, B depends on C, C, and D, too. And then there's node_modules/B/node_modules/C/node_modules/D. If you switch to the next dependency, E depends on FMagi, F depends on C, C depends on D, and then node_modules/E/node_modules/C/node_modules/D. The problem that the individual found when copying the code, when copying the whole project to U disk, I found that there were several G's in the project. I only wrote a few interfaces.

Menu