Node.js Error: Cannot find module express [How to Solve]

1. Install the express framework globally, CMD open the command line, and enter the following command:

    npm install -g express

In the express 4.x version, the command tool is separated, a command tool is installed, and the command is executed:

    npm install -g express-generator

type express --version

2. If execute js file report error: Error: Cannot find module express

execute it again under your own project directory:
npm install express

Read More: