Nodemon 不是 运行

Nodemon is not running

我正在尝试让我的 nodemon 启动 运行ning。但不知何故,它没有 运行 并且没有错误消息,这非常令人沮丧。

请看下面我的package.json:

{
  "name": "umbrella_maintenance",
  "version": "1.0.0",
  "description": "",
  "main": "app-express.js",
  "scripts": {
    "start": "nodemon"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "ejs": "^3.1.5",
    "express": "^4.17.1"
  },
  "devDependencies": {
    "nodemon": "^2.0.6"
  }
}

我尝试了 运行ning npm run start 但它根本不起作用。没有错误消息什么都没有。

当我尝试从 node app-express.js 开始时,我的应用程序 运行 运行良好,但当它是 nodemon 时无法运行。有什么建议吗?

The documentation 说你需要像这样 运行 nodemon nodemon [your node app]。所以在你的情况下:nodemon app-express.js。 nodemon 还有许多其他有用的选项。值得阅读文档。

nodemon 帮助 Web 服务器显示状态。当发生错误或 Web 服务器 运行 正常时,nodemone 会在控制台上显示日志。但是 nodemon 不能 运行 网络服务器,如果确切的路径没有放在命令中。所以 nodemon 帮助 运行ning 由 node path/yourApp.js.

执行的 web 服务器

要执行 nodemon,请键入 nodemon path/yourApp.js