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

278
Views
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 answers
Answer question

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 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!