Nodemon 在保存文件时给出 UnhandledPromiseRejectionWarning

Nodemon gives UnhandledPromiseRejectionWarning upon saving file

我正在使用 Windows 并且我刚刚安装了 nodemon 2.0.12(添加到路径)。每当我 运行 一个基本应用程序时,它应该可以工作,直到我保存文件,然后我收到以下错误

我的项目是一个基本的 Express 应用程序:

const express = require('express')

const app = express()
const PORT = 3000

app.use("/", (req, res) => res.send('test'))

app.listen(PORT, function() {
  console.log('Server started on port 3000')
})

我的package.json如下

{
  "name": "express.1",
  "version": "1.0.0",
  "description": "",
  "main": "app.js",
  "scripts": {
    "dev": "nodemon app.j"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "express": "^4.17.1",
    "nodemon": "^2.0.12"
  }
}

这可能是什么原因?

将 Nodemon 降级到 v2.0.7 似乎可行。我不明白为什么它一开始就坏了。