Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

491
Views
Should I make multiple node_modules folders for multiple files or use one?

I am starting a JavaScript project and its parent directory contains 2 folders: client and server. Both of these will require Javascript packages but I'm confused as to whether I should make a node_modules folder in each of them for their respective dependencies or whether I should create only one and install all the packages there. Basically what I'm asking is whether I should do this:

enter image description here

or this:

enter image description here

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I should make a node_modules folder in each of them for their respective dependencies or whether I should create only one and install all the packages there.

As you have client- Frontend and server - Backend which are two different side of things and they will have their own dependencies with package.json. You might be installing some specific packages which only works on browser and same for server-side environment.

It is good to segregate both the environment to keep dependencies separate. You should check this link to check out things in details.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!