Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Why add node modules to your versioning (robertonodi.me)
4 points by ronodi on March 31, 2014 | hide | past | favorite | 4 comments


Great article.

I would love to see the bad side of adding them to your repository, for example, working with Linux and OSX developers at the same time.


Thanks. I myself use Windows and lots of projects I worked on are running Debian in production. There were a few times you can see the bad side of it, but it always depends on your needs. A quick example would be with sqlite on windows and unix, but this is solved with pre-deploy preparation. Remember that we are talking about production and not development.


Thank you for your reply.

But anyway, adding them to your repository, is development domain, right?

How do you handle adding modules with binary to your repository? If you're using Windows to develop, and Debian to production, what is exactly you pre-deploy preparation to fix this?


Regarding to development it depends on your needs and how mixed is your development environment (is everyone on a Unix system, or you can have Linux/Mac/Windows)

If you are concerned about mixing you binary with source in a repo you can always use `npm install --ignore-scripts` this should download modules without building them and add them to your repo afterwards, followed by a `npm rebuild` and adding created files to `.gitignore`

For the pre-deploy preparation what I'm doing now is preparing everything in a separate location (pre-deploy path), pulling new code rebuilding it if necessary, running tests if all went ok the code is moved to the final deploy path.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: