简体   繁体   English

Nodemon 没有运行

[英]Nodemon is not running

I am trying to get my nodemon to start running.我正在尝试让我的 nodemon 开始运行。 But somehow it doesn't run and it have no error message and it's pretty frustrating.但不知何故,它没有运行,也没有错误消息,这非常令人沮丧。

Please see my package.json below:请在下面查看我的 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"
  }
}

I tried running npm run start but it simply do not work.我尝试运行npm run start但它根本不起作用。 No error message no nothing.没有错误信息,什么都没有。 终端截图

My app runs fine when I try to start with node app-express.js , but doesn't work when it's nodemon.当我尝试从node app-express.js开始时,我的应用程序运行良好,但在 nodemon 时无法运行。 Any advice?有什么建议吗?

The documentation says that you need to run nodemon like this nodemon [your node app] .文档说你需要像这个nodemon [your node app]一样运行 nodemon 。 So in your case: nodemon app-express.js .所以在你的情况下: nodemon app-express.js There are a variety of other useful options for nodemon. nodemon 还有许多其他有用的选项。 It's worth reading the documentation.值得阅读文档。

nodemon help web server shows status. nodemon help web 服务器显示状态。 When an error occurs or web server runs well then nodemone shows logs on console.当发生错误或 web 服务器运行良好时,nodemone 会在控制台上显示日志。 But nodemon can't run web server if the exact path isn't put on command.但是如果没有将确切路径放在命令中,nodemon 将无法运行 web 服务器。 So nodemon helps node running web server which is executed by node path/yourApp.js .因此 nodemon 帮助节点运行 web 服务器,该服务器由node path/yourApp.js执行。

To execute nodemon, type nodemon path/yourApp.js .要执行 nodemon,请输入nodemon path/yourApp.js

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM