折旧警告不允许在 AZURE 上部署应用程序, [英] Depreciation warning does not allow deploying an Application on AZURE,
问题描述
我在将应用程序部署到 AZURE 时收到以下警告.
I get the following warning while deploying my application to AZURE.
(node:6568) [DEP0064] DeprecationWarning: tls.createSecurePair() 是已弃用.请改用 tls.Socket.
(node:6568) [DEP0064] DeprecationWarning: tls.createSecurePair() is deprecated. Please use tls.Socket instead.
但这不允许我的应用程序启动.Azure 日志显示以下内容:
But this does not allow my application to start. Azure logs show the following thing:
日志路径:D:homeLogFilesApplication>
PATH OF LOGS: D:homeLogFilesApplication>
推荐答案
我知道这个问题已经 8 个月了,但为了完整起见,我将提供有关如何在 Azure 中抑制 Node 警告的答案.其实有多种方式:
I know this question is already 8 month old, but just for completeness I am going to provide the answer on how to suppress warnings for Node in Azure. There is actually multiple ways:
只需在 iisnode.yml 中加入以下行:
Just put the following line in the iisnode.yml:
nodeProcessCommandLine: node.exe --no-deprecation --no-warnings
或者,如果您使用 Node 版本的完整路径,则需要引用它,例如
Or if you use a full path to a version of Node, you'll need to quote it, e.g.
nodeProcessCommandLine: "D:Program Files (x86)
odejs10.6.0
ode.exe" --no-deprecation --no-warnings
使用 web.config
在文件末尾,您会看到一个注释掉的标记.将其替换为以下内容:
Using web.config
Toward the end of the file, you'll see a commented out tag. Replace it by something like this:
<iisnode nodeProcessCommandLine="node.exe --no-deprecation --no-warnings"/>
注意事项
iisnode.yml 优先于 web.config
Notes
iisnode.yml takes precedence over web.config
在此处查看有关如何在 Azure 中添加运行时标志的原始帖子:将标志传递给 Azure Web Apps 中的 NodeJS 的 Chrome V8 引擎
See the original post on how to add runtime flags in Azure here: Pass flags to NodeJS's Chrome V8 engine in Azure Web Apps
这篇关于折旧警告不允许在 AZURE 上部署应用程序,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!