node.js, Error: Cannot find module 'express'

后端 未结 18 1901
情话喂你
情话喂你 2020-12-02 08:57

I am new to Node.js, try to learn express to build my first web application. I got stuck on my very first sample code and need some help to get it running. Before I post th

18条回答
  •  隐瞒了意图╮
    2020-12-02 09:44

    Check if you have installed express module. If not, use this command:

    npm install express
    

    and if your node_modules directory is in another place, set NODE_PATH envirnment variable:

    set NODE_PATH=your\directory\to\node_modules;%NODE_PATH%
    

提交回复
热议问题