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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:13:56+00:00 2026-06-04T04:13:56+00:00

In my node projcet I build independent modules in to folder with main.js as

  • 0

In my node projcet I build independent modules in to folder with main.js as entry point and locate helpers for that module in the same folder as different files.

Ex:
Aggregator:
     |___package.json
     |___main.js
     |___node_modules
         |_____helper1.js
         |_____helper2.js

Hence node will resolve all my helpers’ dependency for modules [Ex: Aggregator] from local node_modules folder. Reason for above structure is, I don’t need to care about the path on require

I use package.json to specify that entry point is main.js incase require is for Aggregator

Ex:
//Sample.js
require('Aggregator'); // Resolves to Aggregator/main.js

Ex:
package.json of Aggregator module

  {
        "name": "Aggregator"
      , "description": "Returns Aggregates"
      , "keywords": ["aggregate"]
      , "author": "Tamil"
      , "contributors": []
      , "dependencies": {
            "redis": "0.6.7"
        }
      , "lib"           : "."
      , "main"          : "./main.js"
      , "version"       : "1.0"
    }

Here what is the dependency column for? I referred this link. My code seems to work even if I specify version of redis as 10000 without any warning. I tried deleting my redis module out of project to test whether node picks it up and resolves the dependency but it didn’t. When to use that dependency attribute in package.json? Is it just a note for future reference?

npm version 1.1.0-beta-4 ;
node version v0.6.6

  • 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-04T04:13:57+00:00Added an answer on June 4, 2026 at 4:13 am

    The dependencies value is used to specify any other modules that a given module (represented by the package.json) requires to work. When you run npm install from the root folder of a given module, it will install any modules listed in that dependencies object.

    If you didn’t get any errors with redis: 10000 listed in there, my guess is that you never ran npm install, and therefore it never even tried to install redis. Note that if your code is working fine without having run npm install, most likely your code doesn’t even need redis in the first place, and that entry should be removed from the dependencies object.

    While not every entry in the package.json is essential to understand for day-to-day development, a working knowledge of dependencies is essential. I would recommend reading through the dependencies section on the npm website.

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

Sidebar

Related Questions

Here's the situation… So I've created a Node.js module that acts as an interface
After pulling down a module from GitHub and following the instructions to build it,
I'm trying to build a tree, where each node has six children. The method
Are there tools that will profile the Maven build process itself so that I
i'm trying to pull out a node from a csproj file that looks like
We have a powershell build script that calls out to other scripts that is
Build started 16/11/2011 9:24:11 AM. Project C:\Builds\1\NetTellerMigration\NetTellerMigrationBuild\Sources\blah.sln on node 1 (default targets). ValidateSolutionConfiguration: Building
i'm working with Zend mvc project with ZendServer. now i read of node.js that
im trying to build node.js but i have problem . i downloaded 2 versions
I'm new into Node.js and my intention is to build a web site similar

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.