UnhandledPromiseRejectionWarning: Error: Command failed: wmic process where (ParentProcessId=4388) g

node 使用nodemon 报错 UnhandledPromiseRejectionWarning: Error: Command failed: wmic process where (ParentProcessId=4388) get ProcessId 2> nul
at checkExecSyncError (child_process.js:760:11)
at execSync (child_process.js:833:15)
at kill (C:\Users\Glasssix-SH\Desktop\koa2\node_modules_nodemon@2.0.12@nodemon\lib\monitor\run.js:345:26)
at Function.run.kill (C:\Users\Glasssix-SH\Desktop\koa2\node_modules_nodemon@2.0.12@nodemon\lib\monitor\run.js:437:7)
at Bus. (C:\Users\Glasssix-SH\Desktop\koa2\node_modules_nodemon@2.0.12@nodemon\lib\monitor\run.js:507:7)
at Bus.emit (events.js:412:35)
at restartBus (C:\Users\Glasssix-SH\Desktop\koa2\node_modules_nodemon@2.0.12@nodemon\lib\monitor\watch.js:228:7)
at FSWatcher.filterAndRestart (C:\Users\Glasssix-SH\Desktop\koa2\node_modules_nodemon@2.0.12@nodemon\lib\monitor\watch.js:212:16)
at FSWatcher.emit (events.js:400:28)
at FSWatcher.emitWithAll (C:\Users\Glasssix-SH\Desktop\koa2\node_modules_chokidar@3.5.2@chokidar\index.js:540:8)
(node:10132) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was
not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 5)
一直以为是没有添加catch 结果在一个网站上看到
npm uninstall nodemon npm install nodemon@2.0.7 --save-dev 有可能是nodemon的版本问题
原文链接:https://stackoverflow.com/questions/68250987/command-failed-wmic-process-after-updating-npm-in-express-app

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值