How to properly upgrade npm packages