当前位置:网站首页>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
边栏推荐
- org. apache. parquet. schema. InvalidSchemaException: A group type can not be empty. Parquet does not su
- 关于局域网如何组建介绍
- Feign report 400 processing
- Linux MySQL data timing dump
- MySQL master-slave replication
- Knowledge points and examples of [seven input / output systems]
- 扫码登录的原理你真的了解吗?
- How to build tiktok user trust and drive fan growth
- Pytorch: the pit between train mode and eval mode
- Project framework of robot framework
猜你喜欢
CentOS MySQL multi instance deployment
How to build tiktok user trust and drive fan growth
Lock锁
Deepinv20 installation MariaDB
[registration] tf54: engineer growth map and excellent R & D organization building
[pimf] openharmony paper Club - what is the experience of wandering in ACM survey
博士申请 | 厦门大学信息学院郭诗辉老师团队招收全奖博士/博后/实习生
Path environment variable
Loggie source code analysis source file module backbone analysis
Milvus 2.0 détails du système d'assurance de la qualité
随机推荐
Introduction to how to set up LAN
TypeError: set_figure_params() got an unexpected keyword argument ‘figsize‘
Mock test
Variable length parameter__ VA_ ARGS__ Macro definitions for and logging
Detailed explanation of Milvus 2.0 quality assurance system
About stream flow, write it down briefly------
Detailed explanation of file operation (2)
5-minute NLP: text to text transfer transformer (T5) unified text to text task model
English | day15, 16 x sentence true research daily sentence (clause disconnection, modification)
websocket
手写事件发布订阅框架
Use case execution of robot framework
Do you really understand the principle of code scanning login?
Log4j output log information to file
计算饼状图百分比
MySQL master-slave synchronization pit avoidance version tutorial
Dlib of face recognition framework
Pytorch: the pit between train mode and eval mode
CentOS MySQL multi instance deployment
The new MySQL table has a self increasing ID of 20 bits. The reason is