NPM Command List

  • npm init: Initialize a new Node.js project. This command is used to create a package.json file, which contains metadata about the project and its dependencies.

  • npm i or npm install: Install project dependencies. This command needs to be run initially and whenever there are changes to the package.json file to ensure that the required packages are installed.

  • npm run format: Format code according to project conventions.

  • npm run format:check: Check code formatting without making changes.

  • npm run spell-check: Check spelling in the project.

  • npm run lint:md: Run markdown linting for the project.

  • nvm use <version>: Switch Node.js version using NVM (Node Version Manager).

Last updated