我在 WebStorm 中運行具有 npm 配置的 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"
}
}
uj5u.com熱心網友回復:
必須是2022.1.2 中修復的WEB- 55884。解決方法:打開設定 | 語言和框架 | Node.js并將包管理器設定為 npm 包檔案夾,例如C:\Program Files\nodejs\node_modules\npm.
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/481601.html
標籤:javascript 节点.js 调试 npm 网络风暴
