Nodejs installation is complete, and execution command appears version number, but cannot execute test JS

Source: Internet
Author: User

First step: Download Nodejs and install

: https://nodejs.org/en/

Can be installed on other disks.

Step Two: Configure environment variables

One is the directory that adds node.exe on path D:\\nodejs

One is to increase the environment variable Node_path, and the value is d:\\nodejs\\node_modules.

Step Three: Install Express

Open the cmd command line, use the command line to navigate to this node directory, type the command NPM install express[installation Express to relative path] or NPM install express-g[installation Express to absolute path]

Finally: Enter node-v on the command line if the output Nodejs version is installed successfully!

I missed the second and third steps, node can also display version, but cannot execute JS code!

Nodejs installation is complete, and execution command appears version number, but cannot execute test JS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.