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

279
Visualizações
Installing npm modules for node package

I'm making a npm package as a test, and i want to install typescript. This makes a node_modules folder which is not needed. How do i install npm depencices without node_modules?

about 4 years ago · Santiago Gelvez
1 Respostas
Responde à pergunta

0

It is practically impossible to avoid making a node_modules folder, as it contains the source code for the module, downloaded onto your hard drive.


However, even though it's impossible to avoid downloading node_modules, you can add it to an ignore file (such as .gitignore).

If you want to avoid node_modules in both Git and npm (recommended), then you only have to create a .gitignore file, as npm will ignore everything specified in the .gitignore file.

node_modules

Simply add the above in .gitignore.

If you only want it to ignore node_modules in npm and not Git (not recommended), then create a .npmignore file, and add the following:

node_modules

In summary, even though it isn't possible to remove node_modules, you can ignore it!

about 4 years ago · Santiago Gelvez 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