"Node.js" Windows installation Express: ' Express ' is not an internal or external command, nor a running program or batch file. __js

Source: Internet
Author: User
Tags generator

Windows installation Nodejs:

Node Download address: https://nodejs.org/download/Here is the 64bit.msi version.


Custom Installation path: D:\nodejs

To set the global installation save directory:

NPM config set prefix "D:\nodejs\node_global"

NPM config set cache "D:\nodejs\node_cache\" (first built Node_cache directory)


It is then installed directly into the global directory when the dependency is installed using the NPM-G command.


Install Express:

NPM Install-g Express (the default is to install the latest version of Express)

Because the latest version of Express to the bin, so also need to install additional Express-generator

NPM install-g Express-generator


Express version number can also be specified at installation

NPM install-g express@3

or NPM install-g express@3.5.0 (3.* version does not require additional installation express-generator)

If you want to uninstall off, use

NPM uninstall-g Express Command (no version number required)


Check for success after installation:

Express-v (v is uppercase, v somewhat unrecognized)




If you appear
' Express ' isn't recognized as an internal or external command,
Operable program or batch file. Command not recognized


, the environment variables may not be configured well.

Find the directory of Express express.cmd two files in this machine or in your own global installation directory.


Because I previously the global installation directory for D:\nodejs\node_global;

So directly will D:\nodejs\node_global; Add to Path of environment variable:



Save, close the Cmd interface and reopen it:


The installation was successful.

Related Article

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.