8

I'm using a library from another person but it's probably pretty old and, even though it works just fine, I get a DEP066 deprecation error in my console when I run it. I'm a COMPLETE noob when talking about javascript so I need your help. Is there a way to disable the deprecation warning/fix it if I use a newer function ?

EDIT: Thank you so much! It works with the --no-deprecation option.

  • 1
    Yes, you can fix the library code by replacing the old function call with the new one. – Bergi Nov 02 '19 at 16:45

1 Answers1

23

Try running the the script using the the --no-deprecation parameter which will "silence deprecation warnings":

node --no-deprecation script

Alternatively, --no-warnings will "silence all process warnings (including deprecations)."

KyleMit
  • 30,350
  • 66
  • 462
  • 664
Karthik
  • 1,332
  • 1
  • 12
  • 21