当前位置:网站首页>1-3 nodejs installation list configuration and project environment
1-3 nodejs installation list configuration and project environment
2022-04-23 16:58:00 【Endless cake】
Module installation and operation steps
(1) Based on npm Install third party modules
1. In a local project , Create a file package.json file ; This file is used to record the information of the third-party modules we installed . Or configure some executable script commands .
be based on yarm The installation will generate a configuration list by default , Only information , But there is no manual generated complete .
So recommend npm install :
command :npm init -y
The generated list is as follows :
{
"name": "c_web", // Module name
"version": "1.0.0", // Version number
"description": "", // Module description
"main": "index.js", // Module main entry file
"scripts": { // Executable script . Here is an example :
"dev": "webpack --mode development", // Packaging in the development environment
"build": "webpack --mode production" // Packaging in a production environment
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": { // Production depends on
"jquery": "^3.4.1"
},
"devDependencies":{ // Development depends on
}
}
Its main function is , When the team assists in development , Others pull items from remote warehouses , Know which modules are installed in the project , according to package.json Of
The list can be installed by yourself .( Because the general project upload is not upload node_modules Of , Because there are too many dependent libraries )
Be careful : Configuration list , Do not appear in Chinese , May not be able to recognize .
(2) install
Development depends on : Only the third-party modules that are relied on in the project development phase
npm install xxx --save Save to the production dependency of the configuration list
Production depends on : When the project is deployed and implemented , Also need to rely on third-party modules
npm install xxx --save dev Save to the development dependency of the configuration manifest
–dev perhaps --D It's all about installing components into development dependencies
(3) When deploying, run the environment
When you get a new project , And pull it down from the warehouse . When there is no dependency , Just execute the order :
npm install perhaps yarn install that will do .
because npm It will automatically retrieve whether there is... In the directory package.json file , And install in sequence according to the list in the document .
without , Then nothing is installed .
版权声明
本文为[Endless cake]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230554520297.html
边栏推荐
- Tencent resolves the address according to the IP address
- ◰GL-着色器处理程序封装
- PHP高效读大文件处理数据
- Paging SQL
- Copy constructor shallow copy and deep copy
- Introduction to new functions of camtasia2022 software
- Interface document yaml
- Pytorch: the pit between train mode and eval mode
- 织梦DEDECMS安全设置指南
- Calculation formula related to tolerance analysis
猜你喜欢

Go language, array, string, slice

oracle 中快速获取表的列名列表

Use case execution of robot framework

VLAN高级技术,VLAN聚合,超级Super VLAN ,Sub VLAN

如何建立 TikTok用户信任并拉动粉丝增长

MySQL master-slave replication

昆腾全双工数字无线收发芯片KT1605/KT1606/KT1607/KT1608适用对讲机方案

True math problems in 1959 college entrance examination

Quick install mongodb

How much do you know about the process of the interview
随机推荐
How to choose the wireless gooseneck anchor microphone and handheld microphone scheme
Pycham connects to the remote server and realizes remote debugging
New keyword learning and summary
关于局域网如何组建介绍
Detailed explanation of information abstract, digital signature, digital certificate, symmetric encryption and asymmetric encryption
New project of OMNeT learning
Nacos + aspnetcore + Ocelot actual combat code
PHP高效读大文件处理数据
[pimf] openharmony paper Club - what is the experience of wandering in ACM survey
Smart doc + Torna generate interface document
MySQL modify master database
Use case labeling mechanism of robot framework
Variable length parameter__ VA_ ARGS__ Macro definitions for and logging
Rtklib 2.4.3 source code Notes
英语 | Day15、16 x 句句真研每日一句(从句断开、修饰)
伪分布安装spark
Nodejs installation and environment configuration
Customize my_ Strcpy and library strcpy [analog implementation of string related functions]
Expression "func" tSource, object "to expression" func "tSource, object" []
计组 | 【七 输入/输出系统】知识点与例题