Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9218469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:52:17+00:00 2026-06-18T02:52:17+00:00

My Situation I’m developing a Node.js application as npm module. In order to be

  • 0

My Situation

I’m developing a Node.js application as npm module.

In order to be able to run this app, I installed all the npm dependencies. So, my project contains some ./node_module/ folders containing external module dependency builds.

I maintain my project using git and I publish using a GitHub repository.

My Problem

I don’t want to publish all my local builds of the npm module dependencies on GitHub.

I only want to publish my own code. The users of my module should use npm install to get the current builds dependencies.

My Question

What’s the best way to keep the dependency builts away from my GitHub repository?

Thanks for your answer (or comment). – If anything’s unclear, please comment.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:52:18+00:00Added an answer on June 18, 2026 at 2:52 am

    In the root directory of your project (the one above node_modules) add the following line to the end of your .gitignore file (create it if needed):

    node_modules
    

    That will prevent the node_modules files from being added to the GitHub repository.

    Then create or open the package.json file in that same directory, and add a dependencies section like so:

    {
       "dependencies": {
          "module": "0.0.x",
          ...
       }
    }
    

    Generally, you’ll want to use 0.0.x for the format of your versions. This ensures you get bug fixes but no breaking or major changes in your dependencies, so they will stay compatible with your module.

    The package.json will tell npm to install anything listed in dependencies whenever your module gets installed. You can read more about package.json here.

    And here is a great little overview of the entire process.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Situation: I often run into this problematic and never know how to solve it.
Situation: I want to run some app on my vps ubuntu server for crawl
Situation: A high-scale Azure IIS7 application, which must do this: Receive request Place request
Situation: 1. Linux TCP server 2 Windows C# client application The server receives messages
Situation is you have to develop an application against an Active Directory Tree. Want
Situation I want to convert certain status fields within my PHP/MySQL application to handle
Situation: I have a List<IQueryable<MyDataStructure>> . I want to run a single linq query
Situation: We've got this DIV with thumbnails who need their src being changed on
Situation: I am creating an app in C# that uses Oracle.DataAccess.Client (11g) to do
Situation: I have a wrapper panel UserControl like this (namespaces and visual details removed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.