【问题标题】:Express on NPM doesn't start applicationNPM 上的 Express 不启动应用程序
【发布时间】:2014-06-11 04:03:14
【问题描述】:

安装了最新的 NPM v0.10.28 然后我安装了express by

npm install express -g

然后我按如下方式安装了应用程序

express testExpress
cd testExpress && npm install

然后我运行以下命令来启动服务器

DEBUG=testExpress ./bin/www

但它给出了错误

'DEBUG' is not recognized as an internal or external command,
 operable program or batch file.

也试过了

 node DEBUG=testExpress ./bin/www

还是报错

module.js:340
    throw err;
          ^
Error: Cannot find module 'C:\tmp\testExpress\DEBUG=testExpress'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

我在做什么错误?请帮忙。

【问题讨论】:

标签: express npm


【解决方案1】:

您正在尝试在 Windows 上使用 Linux 环境变量语法。

你想要

SET DEBUG=testExpress
bin\www

【讨论】:

    猜你喜欢
    • 2019-09-29
    • 2019-08-02
    • 1970-01-01
    • 2021-04-28
    • 1970-01-01
    • 2012-11-10
    • 1970-01-01
    • 2020-08-31
    • 2023-01-13
    相关资源
    最近更新 更多