我无法在 WebStorm npm 配置中进行调试

I am unable to debug in WebStorm npm configuration

我正在 运行在 WebStorm 中使用 npm 配置安装 Node 应用程序,但我无法调试,我不断收到以下错误。

我有一个干净的系统,安装了 node 16.5.0 和 npm

该应用程序 运行 或当您 运行 它时。

"c:\Program Files\nodejs\npm.cmd" run start
Debugger listening on ws://127.0.0.1:63505/499bdffd-e2d2-40af-9e44-0fc1b93a7404
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Waiting for the debugger to disconnect...
^C^CTerminate batch job (Y/N)? 
Process finished with exit code 1

这是我的 package.json

{
  "name": "storefront_backend",
  "version": "0.1.0",
  "description": "",
  "main": "server.ts",
  "scripts": {
    "build": "tsc --build",
    "start": "ts-node src/server.ts",
    "watch": "tsc-watch --esModuleInterop src/server.ts --outDir ./dist --onSuccess \"node ./dist/server.js\"",
    "test": "tsc -p . & mocha ./src/spec/*.js",
    "tsc": "tsc"
  },
  "author": "Udacity",
  "license": "ISC",
  "dependencies": {
    "body-parser": "^1.19.0",
    "db-migrate": "^0.11.13",
    "db-migrate-pg": "^1.2.2",
    "dotenv": "^16.0.1",
    "express": "^4.17.1",
    "jsonwebtoken": "^8.5.1",
    "pg": "^8.5.1",
    "typescript": "^4.1.3"
  },
  "devDependencies": {
    "@types/chai": "^4.3.1",
    "@types/express": "^4.17.9",
    "@types/jasmine": "^3.10.6",
    "@types/mocha": "^9.1.1",
    "@types/node": "^17.0.35",
    "@types/pg": "^7.14.7",
    "bcrypt": "^5.0.1",
    "chai": "^4.3.6",
    "chai-http": "^4.3.0",
    "eslint": "^8.16.0",
    "jasmine": "^3.6.4",
    "jasmine-spec-reporter": "^6.0.0",
    "jasmine-ts": "^0.3.0",
    "jest": "^28.1.0",
    "mocha": "^10.0.0",
    "request": "^2.88.2",
    "supertest": "^6.2.3",
    "ts-node": "^9.1.1",
    "tsc-watch": "^4.2.9"
  }
}

必须是在 2022.1.2 中修复的 WEB-55884。解决方法:打开 设置 |语言与框架 | Node.js 并将 包管理器 设置为 npm 包文件夹,例如C:\Program Files\nodejs\node_modules\npm.