zhiqingstudy

Be a young person with knowledge and content

What is a bag

The third-party module in Node.js is also called package.

Source of package

Unlike the built-in modules and custom modules in Node.js, the package is developed by a third party individual or team and is free for everyone to use

Note: The packages in Node.js are free and open source, and can be downloaded and used for free without paying

Why package is needed

Because the built-in module of Node.js only provides some low-level APIs, the efficiency of project development based on the built-in module is very low.

The package is encapsulated based on the built-in module, providing a more advanced and convenient API, which greatly improves the development efficiency

Where to download the package

There is a foreign IT company called npm, Inc. It has a very famous website: https://www.npmjs.com/ It is the largest package sharing platform in the world. You can search for any package you need from this website.

Npm, Inc. has provided an address: https://registry.npmjs.org/ To share all the packages externally, we can download the packages we need from this server.

be careful:

·From https://www.npmjs.com/ Search the website for the package you need

·From https://registry.npmjs.org/ Download the package you need from the server

How to download a package

NPM, Inc. provides a package management tool. We can use this package management tool from https://registry.npmjs.org/ The server downloads the required packages to local users.

This package management tool is called Node Package Manager (NPM package management tool for short). This package management tool is installed on the user's computer along with the Node.js installation package.

You can run the npm - v command on the terminal to view the version number of the npm package management tool installed on your computer.

Commands for installing packages in a project

If you want to install the package with the specified name in the project, you need to run the following command:

npm install 包的完整名称

The above packing command can be abbreviated as follows:

npm i 包的完整名称
comment
head sculpture
Code:
Related

The art of interpersonal communication and communication

A code of conduct that regulates and regulates interpersonal relationships

The importance of interpersonal relationships




Unless otherwise specified, all content on this website is original. If the reprinted content infringes on your rights, please contact the administrator to delete it
Contact Email:2380712278@qq.com

Filing number:皖ICP备19012824号