Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Nicholas Lansing
Nicholas Lansing
8,901 Points

extra packages installed with bcrypt

When I go to install bcrypt, seems like everything gets installed but I don't only get bcrypt I get a lot of packages intalled in my npm_modules folder. Is this because I need the bcrypt dependencies too?

Nicholas Lansing
Nicholas Lansing
8,901 Points

got it, thank you for the response!

1 Answer

Yes, that's exactly right. Just as your project becomes dependant on bcrypt for some of it's functionality, bcrypt is also dependant on other libraries. Software sharing communities like npm are like a great big web of dependencies with so much interconnection. It's fascinating, really. So when you install a package for your project, any of that package's dependencies are also going to be installed and live in another node_modules directory. This is a big reason why you never, ever want to commit your dependencies because they can grow almost exponentially. The code you wrote might be 1 megabyte, while your dependencies are half a gig. So if you aren't doing it already, always create a file in the root directory of your project called .gitignore and put node_modules in it. Git will see this file and automatically ignore any folders or files specified in it.