Angular-cli, node, npm most used commands

Below is a summary of the most used commands, specially when starting up or debugging an angular project tested on node server. Note that to...

Below is a summary of the most used commands, specially when starting up or debugging an angular project tested on node server.


Note that to execute the commands below, you need to install node first.
// check node and npm versions
node --version
npm --version

// install the latest angular cli
npm install -g @angular/cli@latest

//install angular cli in dev dependencies
npm install --save-dev @angular/cli@latest

// install dependencies in package.json
npm install
// install node-sass for processing scss
npm install -g node-sass
// install specific version of dependency, for example typescript
npm install --save-dev typescript@2.6.2

// analyze available updated dependencies
ncu

// update package.json (change version in file) and dependencies
ncu -u

// update the local libraries
npm update

// check angular/cli version
ng --version

// clean the cache
npm cache clean --force

// verify the cache
npm cache verify

// remove unused dependencies
npm prune

// uninstall angular cli
npm uninstall -g @angular/cli

// remove node_modules and dist folder
rm -rf node_modules dist

// build the project
ng build --prod --aot=false

Notes:

  • Node and npm can be uninstalled in windows control panel.
  • Some commands are not available anymore in newer version of node like ncu. Replaced by npm update.

COMMENTS

mas template
Name

amazon,1,angular,8,bigdata,2,business,1,course-spring,27,courses,6,database,4,docker,3,java,50,kafka,1,keycloak,4,microservices,5,mysql,1,neworking,1,nosql,2,php,1,pinned,2,react,3,server management,7,shared drive,1,spring,7,synology,1,troubleshooting,2,web,1,wordpress,1,
ltr
item
toztech: Angular-cli, node, npm most used commands
Angular-cli, node, npm most used commands
toztech
https://toztech.blogspot.com/2018/04/angular-cli-node-npm-most-used-commands.html
https://toztech.blogspot.com/
https://toztech.blogspot.com/
https://toztech.blogspot.com/2018/04/angular-cli-node-npm-most-used-commands.html
true
2554149350007112447
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content