gpt4 book ai didi

node.js - 折旧警告不允许在 AZURE 上部署应用程序,

转载 作者:行者123 更新时间:2023-12-03 22:22:37 24 4
gpt4 key购买 nike

在将应用程序部署到 AZURE 时,我收到以下警告。

(node:6568) [DEP0064] DeprecationWarning: tls.createSecurePair() is deprecated. Please use tls.Socket instead.

但这不允许我的应用程序启动。 Azure 日志显示以下内容:

enter image description here

日志路径:D:\home\LogFiles\Application>

最佳答案

我知道这个问题已经存在 8 个月了,但为了完整起见,我将提供有关如何抑制 Azure 中的 Node 警告的答案。实际上有多种方法:

使用iisnode.yml

只需将以下行放入 iisnode.yml 中即可:

nodeProcessCommandLine: node.exe --no-deprecation --no-warnings

或者,如果您使用 Node 版本的完整路径,则需要引用它,例如

nodeProcessCommandLine: "D:\Program Files (x86)\nodejs\10.6.0\node.exe" --no-deprecation --no-warnings

使用 web.config

在文件末尾,您将看到一个注释掉的标签。将其替换为如下内容:

<iisnode nodeProcessCommandLine="node.exe --no-deprecation --no-warnings"/>

注释

iisnode.yml 优先于 web.config

请参阅有关如何在 Azure 中添加运行时标志的原始帖子:Pass flags to NodeJS's Chrome V8 engine in Azure Web Apps

关于node.js - 折旧警告不允许在 AZURE 上部署应用程序,,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49380280/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com