How to run node in IDEA? The following article will introduce to you how to configure, install and run node.js in IDEA. I hope it will be helpful to you!
![How to configure the Node environment in IDEA? Brief analysis of methods](https://img.php.cn/upload/article/000/000/024/64008ce057216166.jpg)
1. Download Node.js
Official website download link:Node.js
Click the red marked area in the picture below to download the msi file
![](https://img.php.cn/upload/article/000/000/024/82cc0b7b97e128d921021aac6f69a8eb-0.png)
![](https://img.php.cn/upload/article/000/000/024/82cc0b7b97e128d921021aac6f69a8eb-1.png)
【Recommended related tutorials: nodejs video tutorial】
2. Install Node.js
Open the msi file
![](https://img.php.cn/upload/article/000/000/024/5bc57f848c57670a9964e7a1c34a939b-2.png)
## Click "Next" all the way (it is recommended to customize the file installation path)
Installation completed
3. Configure Node.js
Open IDEA
as shown below and enter the settings
![](https://img.php.cn/upload/article/000/000/024/e9d2d6a0c251bd9b423919cf2896e697-3.png)
Find Node.js in Languages and Frameworks
![](https://img.php.cn/upload/article/000/000/024/6fb3a5dbca3832ee9f756b521ba3bc6f-4.png)
Select the node interpreter (find the corresponding node.exe in the installed Node.js)
![](https://img.php.cn/upload/article/000/000/024/c051589a6b7a9b0f4e417cd1d262dcf5-5.png)
At this point IDEA will automatically find the corresponding package manager (npm.cmd)
Click "OK"
4. Test Node.js
Method 1:
Open any js empty file
Enter "a" in the js file
![](https://img.php.cn/upload/article/000/000/024/c051589a6b7a9b0f4e417cd1d262dcf5-6.png)
Click "Run"
![](https://img.php.cn/upload/article/000/000/024/c051589a6b7a9b0f4e417cd1d262dcf5-7.png)
The window outputs the current Node.js version, the configuration is successful
![](https://img.php.cn/upload/article/000/000/024/d506b77d1b7dbf3a490ab769e015de3d-8.png)
Method 2:
Open any normal js file
![](https://img.php.cn/upload/article/000/000/024/90282c0fdc62d5549b8467364e33f44c-9.png)
Click "Run"
![](https://img.php.cn/upload/article/000/000/024/c051589a6b7a9b0f4e417cd1d262dcf5-7.png)
If the window output is normal, the configuration is successful
For more node-related knowledge, please visit:
nodejs tutorial!
The above is the detailed content of How to configure the Node environment in IDEA? Brief analysis of methods. For more information, please follow other related articles on the PHP Chinese website!