I’m finding Angular2(+) great, particularly being about to code in TypeScript rather than Javascript. However, for a primarily back-end person, getting used to the whole NPM thing has been a learning curve.
Simple things, like keeping the libraries up-to-date has been a challenge. So here are a few points that have helped me, and may help others.
- Updating angular-cli (from angular-cli GitHub page).
### Update global...
npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@latest
### Update local...
rm -rf node_modules dist
npm install --save-dev @angular/cli@latest
npm install
- To help keep package.json file up-to-date, install npm-check-updates.
### Install...
npm install -g npm-check-updates
### Use...
ncu