折旧警告不允许在AZURE上部署应用程序, [英] Depreciation warning does not allow deploying an Application on AZURE,

查看:93
本文介绍了折旧警告不允许在AZURE上部署应用程序,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I get the following warning while deploying my application to AZURE.

(节点: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:\ home \ LogFiles \ Application>

PATH OF LOGS: D:\home\LogFiles\Application>

推荐答案

我知道这个问题已经有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)\nodejs\10.6.0\node.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中添加运行时标志的原始文章:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆