How To Require Module of a Node Submodule

node.js

Solution

Submodule meaning an export from within the X module?

Try...

require('X/path-to-Y')

Problem

Lets say the module X has a Y submodule. From my node app that has a dependency on X, how can I require submodule Y? `var Y = require('X:Y');` results in `Cannot find module 'X:Y'`

Original source