search

Home  >  Q&A  >  body text

node.js - 为什么已经安装全局express 了还是说找不到这个命令?

按照网上教程,(我想自动创建express项目框架)我已经在mac上执行了以下两个命令:
sudo npm install -g express
sudo npm install -g express-generate
安装过程没有报错。为什么还是提示找不到express命令?

问题关闭,已解决

迷茫迷茫2873 days ago492

reply all(3)I'll reply

  • 怪我咯

    怪我咯2017-04-17 15:26:43

    The package name of express’s scaffolding generation is express-generator. Please change the spelling and try again.

    reply
    0
  • 迷茫

    迷茫2017-04-17 15:26:43

    Try to see if other Npm packages can be executed, such as webpack. If not, there may be a problem with your Node installation.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 15:26:43

    http://www.expressjs.com.cn/s...

    If there is a permission problem during execution, add sudo to confirm that there is no problem with execution, and if command not found still exists,

    It’s a matter of environment variables.

    Express is installed under /usr/local/bin on Mac. Please check if this path is not in your Path

    reply
    0
  • Cancelreply