当前位置:网站首页>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
边栏推荐
- How does flash cache data in memory?
- Get the column name list of the table quickly in Oracle
- Knowledge points and examples of [seven input / output systems]
- ◰ GL shadow map core steps
- Feign report 400 processing
- English | day15, 16 x sentence true research daily sentence (clause disconnection, modification)
- Kunteng full duplex digital wireless transceiver chip kt1605 / kt1606 / kt1607 / kt1608 is suitable for interphone scheme
- DanceNN:字节自研千亿级规模文件元数据存储系统概述
- Error in v-on handler: "typeerror: cannot read property 'resetfields' of undefined"
- PHP高效读大文件处理数据
猜你喜欢
[pimf] openharmony paper Club - what is the experience of wandering in ACM survey
网络安全之渗透靶场实战详解
groutine
Nodejs installation and environment configuration
PyTorch:train模式与eval模式的那些坑
∑GL-透视投影矩阵的推导
ACL 2022 | dialogved: a pre trained implicit variable encoding decoding model for dialogue reply generation
How much do you know about the process of the interview
Node access to Alipay open platform sandbox to achieve payment function
Detailed explanation of information abstract, digital signature, digital certificate, symmetric encryption and asymmetric encryption
随机推荐
AIOT产业技术全景结构-数字化架构设计(8)
PostgreSQL column storage and row storage
无线鹅颈麦主播麦手持麦无线麦克风方案应当如何选择
PyMySQL
Dlib of face recognition framework
Zhongang Mining: Fluorite Flotation Process
蓝桥杯省一之路06——第十二届省赛真题第二场
DanceNN:字节自研千亿级规模文件元数据存储系统概述
Detailed explanation of Niuke - Gloves
Dancenn: overview of byte self-developed 100 billion scale file metadata storage system
Blue Bridge Cup provincial road 06 -- the second game of the 12th provincial competition
Detailed explanation of file operation (2)
◰GL-阴影贴图核心步骤
NVIDIA graphics card driver error
Nodejs reads the local JSON file through require. Unexpected token / in JSON at position appears
ACL 2022 | DialogVED:用于对话回复生成的预训练隐变量编码-解码模型
Easyexcel reads the geographical location data in the excel table and sorts them according to Chinese pinyin
Solution architect's small bag - 5 types of architecture diagrams
详解牛客----手套
STM32__ 03 - beginner timer