You have 2 choices:

1. Change your .gitignore
2. Change your require() calls

Example for 1:
(instead of having "node_modules")

node_modules/a
node_modules/b
...

Example for 2:
(in case you put your module in priv_modules)

var xpto = require("./priv_modules/xpto"); 

-- 
Diogo Resende


On Wednesday, October 10, 2012 at 16:09 , Tom wrote:

> I've added the node_modules folder to my .gitignore file, which works fine 
> thanks to NPM Shrinkwrap (after deploying I need to run npm install using the 
> shrinkwrap.json file).
> 
> However, I've got some private modules now that I won't publish to NPM. I 
> would like to require these modules like the other modules in node_modules.
> 
> Unfortunately I cannot put these modules in node_modules, because they'd be 
> ignored by git, messing with my future deployment.
> 
> Where should I place these modules instead? I've been told that editing the 
> paths variable for node's module lookup is highly unrecommended.
> 
> Note that these are small undocumented nonpublic modules, which is why I 
> don't want to publish them to NPM.
> 
> Tom 
> 
> -- 
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: 
> 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 post to this group, send email to nodejs@googlegroups.com 
> (mailto:nodejs@googlegroups.com)
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com 
> (mailto:nodejs+unsubscr...@googlegroups.com)
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
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 post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to