Depreciation warning does not allow deploying an Application on AZURE,

限于喜欢 提交于 2019-12-11 17:59:03

问题


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

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

But this does not allow my application to start. Azure logs show the following thing:

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


回答1:


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:

Using iisnode.yml

Just put the following line in the iisnode.yml:

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

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

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"/>

Notes

iisnode.yml takes precedence over web.config

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



来源:https://stackoverflow.com/questions/49380280/depreciation-warning-does-not-allow-deploying-an-application-on-azure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!