javascriptnode.jsdeprecation-warning

Disable deprecation in JavaScript console


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. Is there a way to disable the deprecation warning/fix it if I use a newer function?


Solution

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

    node --no-deprecation script
    

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