0

I need an initial direction regarding the principles of how to manage react js dependencies to be transportable.

I have developed a react application which uses multiple dependencies (under ./node_dependencies folder) which uses currently 15K folders and 158K files. I am guessing it does not make sense that I am checking in this directory to github so that the enviroment should be ready for other team members (or another PC I am using).

What is the best practice to share these dependencies so that other developers do not need to install the packages one-by-one when they check it out from github ? (like maven pom.xml).

Thanks in advance for your help. Geo

Janez Kuhar
  • 3,705
  • 4
  • 22
  • 45
GeoSystems
  • 35
  • 7
  • 1
    This question seems related: [Managing package.json & package-lock.json with Git](https://stackoverflow.com/questions/55695122/managing-package-json-package-lock-json-with-git) – Janez Kuhar Aug 09 '21 at 17:29
  • 1
    Another similar question: [Do we need to push node_modules on bitbucket](https://stackoverflow.com/questions/40183437/do-we-need-to-push-node-modules-on-bitbucket) – Janez Kuhar Aug 09 '21 at 17:31
  • Thanks for the links @JanezKuhar ! Those were a wide set of answers, and I did not want to get into so much details. Just to mention 2 main points which I found relevant : 1- nmp install downloads all packages needed for the project. I still dont know where it gets the hint to download but does the job ! 2- It can become a problem of dependency if the specific version of libraries are discontinued in the future, hence keeping the ./node_dependencies folder might be a good practice for certain projects. – GeoSystems Aug 14 '21 at 08:35

0 Answers0