Can I install all Angular dependencies globally?

Discussão em 'Angular' iniciado por Anderson Linhares, Outubro 19, 2024.

  1. I'm starting to learn Angular for SPAs, coming from a Python/Django background, with almost no Node.js experience. I already installed @angular/cli globally using npm, since I intend to use it in a few future projects. My plan is to use a Angular frontend with Django Rest Framework for REST API calls.

    I started a new Angular project with ng new, but it seems that for each project I do this it downloads all Angular dependencies into a local node_modules folder, taking 270 MB of disk space.

    I wonder if I can just intall all Angular dependencies globally. If I'm understanding correctly, the final result of compiling my angular project should just be some HTML, CSS and JS files, which I will serve using Apache and Django's url scheme. I don't see why I would need all dependencies on the project folder.

    I googled it and found no clear answer for a begginer. I know it is a good practice to keep specific versions of depencies, like using Virtual Environments for Python. But say I don't care about this for now, is there a way to install and use those dependencies globally?

    Continue reading...

Compartilhe esta Página