Detailed explanation of NodeJS decompression version installation and configuration (with a front-end project scaffolding)

NodeJS installed I used NVM before, I think the NVM is very powerful to replace the NodeJS version, but it is studying, it may be not enough, it is not easy to use, there is still a mistake in the middle; so, finally uninstalled;

Step by step in this article, it is designed to be easy to use:

1] Step 1: Download Nodejs

Chinese official website:

https://nodejs.org/zh-cn/download/

the following figure is the latest version, do not be afraid this is the latest direct download it, select windows version, LTS is Long-term support version, download 64-bit compression version shown in the arrow; individual feels enough to have a compressed version; (possibly installing version of the function, in order to facilitate the use of the decompression version is enough)

详解nodejs解压版安装和配置(带有搭建前端项目脚手架)

2] Step 2: Decompose the compressed package downloaded above, then build two folder node-cache and node-global

here in the installation directory Note Be sure to open the CMD window in the current directory of the package: Shift + mouse button —–> Open the command window, otherwise there is no npm command;

cmd execution, configure the NPM global module path and The default installation location cache

 npm config set cache "E: \ nodeInstall \ node-v10.14.0-win-x64 \ node-cache" npm config set prefix "E: \ NodeInstall \ NODE-V10.14.0-WIN-X64 \ Node-global "  
3] Step 3: Modify configuration environment variable

Right-click on the desktop my computer (or computer) — Property – AdvancedThe system set environment variables —- —- Add NODE_HOME: E: \ nodeInstall \ node-v10.14.0-win-x64 (nodejs you install root, below)

path Add:;% node_HOME%;% node_home% \ Node-globa;

The environment variable is configured;


4] Four steps:

Modify NPM image Why do Taobao do this, because if you download update with npm, NPM speed back is very slow, and it is easy to erode; 详解nodejs解压版安装和配置(带有搭建前端项目脚手架)

npm install -g cnpm Registry = https://registry

Pay attention to this command, black window is still in your NodeJS installation root directory, is the window that is unanimously executed;

is executed, close Black window command;

5] Step 5: Re-opening the CMD command window (the cnpm command is invalid indicates that the last step is not done, because the last step is already configured), install Vue- CLI scaffolding:

CNPM Install – Global Vue-Cli

Shop:
CNPM I -Global vue-cli
  at this point nodejs installed over, and with vue-cli;  
6] sixth step:
easily on your PC Select a location (create a project folder), CMD execute

vue init webpack xxx_front where "xxx_front" is your front-end project name, after waiting, your front-end framework has been completed;

7] Run Project:

Before running in your project root directory: CNPM install or cnpm i install the bag required for front end, installation back to a folder: Node_Modules

Then still in your project with the directory, black window executes CNPM Run Dev The order of the subsequent package is CNPM Run Build

The above is the full content of this article, I hope to everyone I have helpful, I hope everyone will support Tumi Clouds.

© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment