Home > Web Front-end > JS Tutorial > How to configure nodejs environment and npm using webstorm

How to configure nodejs environment and npm using webstorm

php中世界最好的语言
Release: 2018-05-29 17:37:23
Original
4834 people have browsed it

This time I will show you how to use webstorm to configure the nodejs environment and npm. What are the precautions for using webstorm to configure the nodejs environment and npm. The following is a practical case, let's take a look.

——nodejsInstallationand environment configuration

##1.nodejs official website, download the windows platform nodejs environment installation package ( .msi format), install

2. Test whether the installation is successful:

cmd operation, enter the node installation root directory:

node -v; npm -v View version No.

3. Configure global

Create two new folders named node_cache and node_global in the root directory of node installation, which is the nodejs folder.

Set environment variables:Variable name:NODE_PATH

Value: D:\Program Files\nodejs \node_global\node_modules

Note:Because I installed nodejs in the D:\Program Files\ directory, the environment variables are set like this

Check whether the node environment is configured successfully:

cmd enter any directory and verify the node and npm version numbers

——nodejs configuration in webStorm

1. Install webstorm and set the font.

file-》setting-》editor-》color&font
Copy after login
Theme fonts and so on can be set here.

2. Install nodejs and continue to the next step.

The environment variable is probably automatic. Just to be on the safe side, you can check the path

to see if it has been added.

Find the nodejs installation package in run-》editor configurations-》

Download the source code from the nodejs official website, and then

file-》 settings-》Language&framework-》

JavaScript-》libraries Add source code

Sometimes you also need to check

node.js global

The automatic prompt is completed

Input enc in file-》settings and the pop-up encoding format is set to utf-8

I believe I read the case in this article You have mastered the method. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

How to use vue addRoutes to implement dynamic permission routing menu

How to use the http server in angularjs

The above is the detailed content of How to configure nodejs environment and npm using webstorm. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template