DEV Community

Ajay Baraiya
Ajay Baraiya

Posted on

Basic Commands #Node.js Quick Notes.

  1. npm install //Global Node module installation.
  2. npm install <package-name> //Install specific package and adds it to package.json file which holds file dependencies.
  3. npm update //Update all packages for newer version.
  4. npm update <package-name> //Specific package updation.
  5. npm install <package-name>@<version> //Specific package updation with specific version.
  6. npm run <task-name> //To run a task like npm run (watch/dev/rod).
  7. npm install -g //Tell global installation folder.
  8. node_modules/.bin/ //Executable dependencies require to be in this folder.
  9. npm list //To list all installed packages with versions in hierarchical order.
  10. npm view cowsay versions //To check out versions available of a package.
  11. npm install cowsay@1.2.0 //To instll older version or newer version of a package.
  12. Check out https://nodejs.dev/en/learn/update-all-the-nodejs-dependencies-to-their-latest-version/, for more version update in node.
  13. npm uninstall <package-name> //To uninstall a package.

Top comments (0)