Home > Article > Web Front-end > A collection of npm common commands for nodejs
This time I will bring you a collection of common npm commands for nodejs. What are the precautions for using the npm common command collection for nodejs? Here are practical cases, let’s take a look.
NPM provides many commands, such as install and publish. Use npm help to view all commands.
Use npm help
Use npm install . -g in the directory where package.json is located to install the current command line program locally first, which can be used for local testing before release.
Use npm update
Use npm cache clear to clear the NPM local cache, which is used to deal with people who use the same version number to release new versions of code.
Use npm unpublish
Use npm update
Update npm to the latest version, execute the command: npm install npm@latest -g
latest can be set to any version number
I believe you have mastered the method after reading the case in this article, more Please pay attention to other related articles on the php Chinese website!
Recommended reading:
How to use select to get the selected value
Input type=number decimal problem
Require.js detailed explanation
The above is the detailed content of A collection of npm common commands for nodejs. For more information, please follow other related articles on the PHP Chinese website!