Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Anthony Davis699 Points
Why do we use "save-exact" or "-E"?
I am pretty sure that we do --save -E so that we don't worry about future updates breaking our code, but I am not really sure and I was wondering if someone could tell us why we add the "-E"
If we don't do the -E when we save, how does that work as well? Does that simply mean that if someone else is to clone our repository and run npm install, they would install possibly a newer version of the dependency?
If this is the case, should we always run the "-E" no matter what? I have also heard a long time ago, that there is a way to allow for minor updates such as [4.1.1 to upgrade to 4.1.9] or something, so that minor bug fixes happen, but not major game changing ones.
I know this is kind of a lot of questions thrown out there, but just curious is someone is able to explain when, how, and why we would use "-E", something else, or not.