Huge number of files generated for every Angular project

后端 未结 14 1055
旧时难觅i
旧时难觅i 2020-11-28 00:37

I wanted to start a simple hello world app for Angular.

When I followed the instructions in the official quickstart the installation created 32,000 files in my proje

14条回答
  •  失恋的感觉
    2020-11-28 01:24

    This is actually not Angular specific, it happens with almost any project that uses the NodeJs / npm ecosystem for its tooling.

    Those project are inside your node_modules folders, and are the transititve dependencies that your direct dependencies need to run.

    In the node ecosystem modules are usually small, meaning that instead of developing things ourselves we tend to import most of what we need under the form of a module. This can include such small things like the famous left-pad function, why write it ourselves if not as an exercise ?

    So having a lot of files its actually a good thing, it means everything is very modular and module authors frequently reused other modules. This ease of modularity is probably one of the main reasons why the node ecosystem grew so fast.

    In principle this should not cause any issue, but it seems you run into a google app engine file count limit. In that I case I suggest to not upload node_modules to app engine.

    instead build the application locally and upload to google app engine only the bundled filesn but don't to the build in app engine itself.

提交回复
热议问题