Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
NPM clutch cmds ✇

NPM clutch cmds ✇

  • clean cache

    Run an offline verification of existing cache contents

     npm cache verify

    Run cache clear for saving disk space purpose

     npm cache clean --force
  • remove files and re-install

    Run cmd to remove files

     rm -rf node_modules && npm i
  • rebuild node sass

    Run cmd to rebuild node-sass; often needed after removing, updating major changes to packages

     npm rebuild node-sass
  • view globally installed packages

    Run cmd to figure out what the heck is going on with globaly installed packages when seeing warnings/etc

     npm list -g --depth 0`
  • view package versions

    Run cmd to view package versions; often needed after Greenkeeper issues

     npm show <package>@* version
     # in example
     npm show glob@* version
  • get help when I forget part way through a cmd

    Run cmd when a cmd is being typed but the executor (a human typing in a shell) forgets the rest or the cmd or does not know the rest of the cmd

     npm <cmd> --help
     # in example
     npm run --help # joke intended
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.