0

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:

enter image description here

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

CoderX
  • 942
  • 1
  • 10
  • 30
  • 1
    what are the contents of the `.txt` file? – Shahzeb Khan Mar 20 '18 at 10:09
  • The one I have highlighted. – CoderX Mar 20 '18 at 10:48
  • This looks to be a warning specifically around Node. Do you have a library that might be using the tls.createSecurePair call? Also, it would be nice to know what was inside the txt file you've highlighted, not just that there is a file there as Shahzeb mentioned. – MikeWo Mar 20 '18 at 11:38
  • Well, I think the problem is some what else. Because from the console of Azure App, I am able to invoke the service by using the curl command. But outside, its not accessible. **The highlighted text in the question belongs to the mentioned text file**, but I think its useless now. App is working, but I am unable to access it from outside azure machine. – CoderX Mar 20 '18 at 11:51
  • What port is your server trying to listen on? Can you please show the code you're using? – Aaron Chen Mar 21 '18 at 01:41

1 Answers1

6

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

tim
  • 358
  • 3
  • 14