Git Product home page Git Product logo

node.js_npm_commands's Introduction

Node.js and npm Commands

This document provides a quick reference guide for the most commonly used Node.js and npm commands.

Check Node.js Version:

node -v

Displays the installed Node.js version.

Check npm Version:

npm -v

Displays the installed npm version.

Initialize a New Node.js Project:

npm init

Starts a guided process to create a new Node.js project and generates a package.json file.

Install a Package:

npm install <package-name>

Installs a Node.js package. For example, npm install express installs the Express.js library.

Add a Package Locally to Your Project:

npm install <package-name> --save

Adds a package to your project's package.json file as a dependency.

Remove Packages:

npm uninstall <package-name>

Removes a package from your project.

Install a Package Globally:

npm install -g <package-name>

Installs a package globally, making it available for all your projects.

Update Project Dependencies:

npm update

Updates the dependencies in your project.

Check for Outdated Packages:

npm outdated

Checks if packages in your project are outdated.

Run Your Node.js Application:

node <file-name.js>

Runs a Node.js application.

Publish Your Packages (with npm):

npm publish

Used to publish your own package on npm.

Delete Your Packages (with npm):

npm unpublish <package-name> --force

Used to delete your package from npm.

node.js_npm_commands's People

Contributors

seymenbahtiyar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.