Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation method of node and Angular running environment

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces "the installation method of node and Angular running environment". In the daily operation, I believe that many people have doubts about the installation method of node and Angular running environment. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "installation method of node and Angular running environment". Next, please follow the editor to study!

Today, I encountered obstacles when learning to create an Angular project. I encountered a lot of potholes when installing the Angular runtime environment first with the instructional video.

I will record the process of installing the angular running environment here for later students' reference.

First of all: my system is win10, the following installation process is carried out under win10.

Note: all of the following commands are executed under "run powershell as administrator".

Install node.js

First of all, install node.js, this installation is very simple, it is recommended to go to the official website https://nodejs.org/zh-cn/download/ to download the appropriate installation package, this installation is very simple, do not repeat.

Node.js installed after the install additional tools for node.js can not be installed, the need to register the website, registration, which said that the man-machine verification failed, this is the node.js extension kit, can not be installed.

Install the angular environment

In the video, the teacher can quickly install the angular environment using the following instructions, but the progress bar does not move at all during my installation.

Npm install-g @ angular/cli

I guess it's the well-known wall that can't be downloaded from the official angular warehouse.

The solution strategy is to install the Taobao version of the angular environment, please refer to the students to follow the steps strictly, the best command is to copy and paste, to avoid installation failure caused by typing the wrong command.

First, clear the official operating environment of angular:

Npm uninstall-g angular-cli/npm uninstall-g @ angular/cli

Then create a npm-library on the d disk (this is the installation path and file name, which can be set as needed).

Modify the computer's execution policy to RemoteSigned, allowing the system to run scripts:

Set-ExecutionPolicy RemoteSigned

Execute the following commands sequentially:

Npm config set prefix "D:\ npm-library\ npm" npm config set globalconfig "D:\ npm-library\ npm\ etc\ npmrc" npm config set globallgnorefile "D:\ npm-library\ npm\ etc\ npmlgnore" npm install-g cnpm-- registry= https://registry.npm.taobao.org

Edit the environment variable and change the original C:\ Users\ 40859\ AppData\ Roaming\ npm to D:\ npm-library\ npm that changes the setting.

Execute the following command:

Cnpm install-g supervisor

Install the latest version of angular-cli

Cnpm install-g @ angular/cli@latest

Restart the computer and verify the angular-cli version number

Ng version

Finally, if the angular cli version number and Node version number appear, it means that the angular runtime environment has been installed successfully.

At this point, the study on "the installation method of node and Angular running environment" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report