It's only index.js by default. If there is a package.json in that directory it is used to look up the package's "main" entry point. It defaults to "index.js", but it is often something like "lib/<someclass>.js".
~Ryan On Sat, Jul 12, 2014 at 8:01 PM, Deva Kumaraswamy < [email protected]> wrote: > Thanks. That is pretty nifty. However: > I do not see an index.js in the npm->node->modules->node-gyp directory or > any of its sub directories. > My directories on windows looks the same. > Still puzzled, > > Subnote: There is a node-gyp entry in the lib directory that exports the > entries the failing code seems to be looking for. > > > On Friday, July 11, 2014 6:59:48 PM UTC-4, mgutz wrote: >> >> require('../') means require parent directory's index.js. When a require >> path is a directory, node tries index.js. >> >> -- http://twitter.com/rmgraham -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CAGjmZGzTuspXtg%3DWV2rA11Yd1yEz_PGTL9ohKnAN2nmc5Tu5wg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
