I just tried that.. npm ls. And it is giving me a bunch of errors about unmet dependencies.
It's weird that my app seems to be working fine despite all the missing dependencies. But I did just notice that a few things appear to be broken. Now the question is, why isn't it finding the node_modules that is just above the application root? I thought the default behavior is to look for a node_modules in the CWD, and if none is found it crawls up the root and looks in those folders. As it stands the node_modules folder is two levels above the project root so it should find it easily? If I'm wrong in my assumptions, then how can I point it to the folder. That is, without having to modify hundreds of paths accross my project. On Monday, November 18, 2013 4:57:23 AM UTC-5, vesper8 wrote: > > Hello fellow programmers, > > I'm pretty new to node.js and I've just inherited a massive project that's > built in node and I need to prepare it for small team development. > > I apologize in advance for my newbieness.. I hope to become much better at > node.js in the coming months (I have no choice) > > I plan to use SVN and wanted to segment the existing project into many > smaller repos to lessen the chance of conflicts when being working on by > multiple people. > > One thing I want to do is move the node_modules out of the main > application repo because it causes commits and deployments to take waaay > too long because of how massive the node_modules folder is. > > I understand that the node_modules can be anywhere above the application > root so right now I've set it up so it looks like this: > > Before: > /var/myProjects/ProjectX/node_modules/ > /var/myProjects/ProjectX/app.js > /var/myProjects/ProjectX/everything else > > After: > /var/myProjects/node_modules/ > /var/myProjects/ProjectX/app.js > /var/myProjects/ProjectX/everything else > > I run my app and everything seems to be working fine. > > Now here's my confusion. I wanted to make sure that having moved the > node_modules folder one level up from my application root really worked. So > I went ahead and renamed the node_modules folder to "test". > > And low and behold.. my application doesn't break! It doesn't stop > working.. which has me very puzzled. Where is it loading the dependencies > from?? > > I noticed that /home/myUser/.npm/ appears to have all the same > node_modules as the ones that were in my application. Is it loading it from > there? How can I verify this? > > Is what I did ok? Moving node_modules up one folder I mean. > > Really appreciate your time. Thank you > > -- -- 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- 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]. For more options, visit https://groups.google.com/groups/opt_out.
