One of the most annoying things that I found when building an app with Node.js is that you never know what's going to happen when you update a 3rd party library. Because Node is pretty new and everything is in active development, things can change dramatically. Take the noe-mongodb-native library for example. I upgraded to 1.1.x version of the library, and I started getting errors like these when I'm doing an insert:
TypeError: Cannot read property 'safe' of undefined mongodb
I looked at the implementing code and realized they changed how some of the stuff was implemented, so I locked it now to the latest version 1.1.6 and did and `npm install` and re-ran my app. Problem solved afterwards. The lesson of the day...try to lock down your apps to the specific version, or else risk debugging for half an hour trying to solve your problem!
No comments:
Post a Comment