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 7439893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:46:16+00:00 2026-05-29T10:46:16+00:00

I am about to do a large project with node.js and currently try sort

  • 0

I am about to do a large project with node.js and currently try sort a few things out.

In earlier node projects I had an extra folder for all node modules I used. This folder was ignored by git and I managed version and updates via git submodules, which was not easy (no dependencies, updating to new version was not always fun.)

What I am looking for is:

npm install packagename
npm dump_modules_into_file

So everyone else who is involved in this project could do:

npm install_or_update_modules_from_file

I don not want to have node_modules tracked by my git repository. Basically I want something similar to how symonfy2 handles it bundles.

P.S.: I know about npm submodule packagename, but this command is not very helpful because it does not install dependencies and it does not update the modules.

P.S.2: I ready about the package.json, but this also has some flaws. (No parameters and you have to update module versions by hand.)

  • 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-05-29T10:46:17+00:00Added an answer on May 29, 2026 at 10:46 am

    package.json will accomplish what you’re looking for. In your comment about passing the --mongodb:native flag, that flag is an argument to the npm command and does work when using a package.json in your own project. The mongodb package has an “install script” which looks for that flag in the node processing environment. If that flag is present, then it spawns another process for the build. So, if you have mongodb as a dependency in your package.json

    {
        "name": "MyProject"
      , "description": "Test"
      , "version": "0.0.1"
      , "dependencies": {
            "mongodb": "*"
        }
    }
    

    Running npm install --mongodb:native will work.

    With regards to “updating it by hand” – it’s really only the first time that it might take a while, and I’m sure you could write a script to generate it if there are a lot of dependencies. However, it sounds like you have a fairly large team, and if that is the case, then automating the updates to package.json will turn really ugly (think new developers, experimental features, etc.) Having accountability for broken builds in this part of the development cycle isn’t necessarily a bad idea.

    References:

    • https://github.com/christkv/node-mongodb-native/blob/master/install.js
    • http://package.json.nodejitsu.com/ (see “scripts” section)

    EDIT: and as Nick mentioned, adding the ‘node_modules’ directory to .gitignore will prevent any of those files from being checked into your repo

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

Sidebar

Related Questions

I've just inherited a large project previously coded by about 4-5 people. The documentation
I am working in Java on a fairly large project. My question is about
I'm about to inherit a rather large Java enterprise project that has a large
I'm thinking about starting work on a fairly large scale .NET or ASP.NET project
I'm just wondering about large projects - say an airlines reservation system, how many
I was reading these days about large projects implementation in python and Flex, and
We have fairly large C++ application which is composed of about 60 projects in
At my workplace we have one large Subversion repository which holds about 100 projects.
I'm about to start work on a large project that will involve providing a
I'm about to start up a large project where the same database will be

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.