Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

486
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda