1

I restarted learning javascript and I'm coding in a github folder, when I try to debug it on VSCode I get this error:

(node:13088) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use Code --trace-deprecation ... to show where the warning was created)

And this is my code:

const textSize = "Text".length;
console.log(textSize)

Hope someone can help with it

thanks in advance.

MrMythical
  • 8,908
  • 2
  • 17
  • 45
leSa
  • 11
  • 1
  • 2
    Not really an error, that is a warning. How are you running this exactly? – epascarello Oct 11 '21 at 02:32
  • Is this your entire code? This code shouldn’t throw an error on its own – MrMythical Oct 11 '21 at 02:49
  • See https://stackoverflow.com/questions/63673860/vscode-extension-deprecation-warning-buffer-how-to-diagnose/68413237?r=SearchResults&s=1|36.3351#68413237 It is not a problem with your code but a library that vscode uses. – Mark Oct 11 '21 at 03:44
  • So, I`m trying to use the own javascript runner of vscode, then i press f5 to run, it shows the upper window of the debugger (with play, pause, etc.) and this is the only message i get, no answer from the code itself. – leSa Oct 12 '21 at 02:40
  • 1
    Well, that is just a warning. It would not prevent your code from running. Your `console.log` should appear right below it. You have a different issue. – Mark Oct 12 '21 at 19:23

0 Answers0