Azure函数在尝试连接调试器时崩溃,导致nodemon永久重新加载

问题描述 投票:0回答:1

尝试了干净的格式并在使用azure函数和tsc -w时不加任何重新安装nodemon却无济于事,我在循环中得到了这个(这是一个片段,还有更多内容:]]

[nodemon]个文件触发更改检查:dist / api / index.js.map[nodemon]匹配的规则:** / [nodemon]在过滤器之后更改(之前/之后):1/0 [nodemon]个文件触发更改检查:dist / api / index.js [nodemon]匹配的规则:** / [nodemon]更改过滤器之后(之前/之后):1/1 [nodemon]由于以下原因而重新启动更改... [nodemon] dist / api / index.js

[nodemon]个文件触发更改检查:dist / graphql / es.js.map[nodemon]匹配的规则:** / [nodemon]在过滤器之后更改(之前/之后):1/0 [nodemon]个文件触发更改检查:dist / graphql / es.js [nodemon]匹配的规则:** / [nodemon]更改过滤器之后(之前/之后):1/1 [nodemon]由于以下原因而重新启动更改... [nodemon] dist / graphql / es.js

[nodemon]个文件触发更改检查:dist / graphql / databaseInit.js.map [nodemon]匹配的规则:** / [nodemon]在过滤器之后(之前/之后)更改:1/0 [nodemon]文件触发变更检查:dist / graphql / databaseInit.js [nodemon]匹配的规则:** / [nodemon]在过滤器之后(之前/之后)更改:1/1 [nodemon]由于更改而重新启动... [nodemon]dist / graphql / databaseInit.js

我正在使用的VSCode配置:

{“ name”:“启动后端”,“ type”:“节点”,“ request”:“启动”,“ cwd”:“ $ {workspaceRoot}”,“ runtimeExecutable”:“ nodemon”,“ runtimeArgs”:[“ --inspect = 5858”,“ --verbose”],“重新启动”:是的,“端口”:5858,“ console”:“ integratedTerminal”,“ internalConsoleOptions”:“ neverOpen”},

和package.json:

“脚本”:{“ build”:“ tsc”,“ watch”:“ tsc -w”,“ prestart”:“ npm run build && func extensions install”,“ start:host”:“ func start --cors *”,“ start”:“ npm run start:host&npm run watch”,“ build:production”:“ npm run prestart && npm prune --production”,“ test”:“ echo \”尚无测试... \“”},

这不会在按预期方式运行的训练营中发生,我已禁用这些文件所在文档的云同步。

更新

当我绕过nodemon运行基本命令时得到此信息:

29/04/2020 14:56:36]主机初始化(45ms)[29/04/2020 14:56:36]主持人开始了(46ms)[29/04/2020 14:56:36]主持人开始了[29/04/202014:56:36]在127.0.0.1:5859上启动检查器失败:地址已经使用中[29/04/2020 14:56:36]启动工作进程:节点--inspect = 5859“ /Users/ahmed/.nvm/versions/node/v12.16.2/lib/node_modules/azure-functions-core-tools/bin/workers/node/dist/src/nodejsWorker.js”--host 127.0.0.1-端口53018 --workerId b6aaf934-a647-46b0-8bde-35ef8584b03a --requestIdef307ac9-edc9-440b-8735-e81f1879029f --grpcMaxMessageLength 134217728[29/04/2020 14:56:36]带有ID = 11410的节点进程已启动[29/04/202014:56:36]在127.0.0.1:5859上启动检查器失败:地址已经使用中[29/04/2020 14:56:36]启动工作进程:节点--inspect = 5859“ /Users/ahmed/.nvm/versions/node/v12.16.2/lib/node_modules/azure-functions-core-tools/bin/workers/node/dist/src/nodejsWorker.js”--host 127.0.0.1-端口53018 --workerId c12804a8-bb18-485c-95e0-c516c6fc4599 --requestIdc93e0c56-cdf0-4360-869b-d6410005227f --grpcMaxMessageLength 134217728[29/04/2020 14:56:36]带有ID = 11411的节点进程已启动[29/04/202014:56:36]在127.0.0.1:5859上启动检查器失败:地址已经正在使用中[29/04/2020 14:56:36]超出语言的工作人员重新启动重试计算运行时:节点。关闭函数主持人[29/04/202014:56:36]正在停止主机... [29/04/2020 14:56:36]正在停止JobHost[29/04/2020 14:56:36]作业主持人已停止[29/04/2020 14:56:36]主持人关闭完成。 [29/04/2020 14:56:36]主机重新启动。 [29/04/202014:56:36]正在停止JobHost [29/04/2020 14:56:36]作业托管已停止

node.js typescript graphql azure-functions nodemon
1个回答
1
投票

nodemon要求您指定要观看的文件,否则它将检查cwd中的所有内容。您可以使用--watch标志,即--watch dist/

© www.soinside.com 2019 - 2024. All rights reserved.