Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues #255

Open
baerrach opened this issue Sep 20, 2019 · 3 comments

Comments

@baerrach
Copy link

Node is issues the warnings listed below.

These are cause by https://github.com/mscdex/node-ftp/blob/master/lib/connection.js#L53

See https://medium.com/@jasnell/node-js-buffer-api-changes-3c21f1048f97 for more information.

(node:19124) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    at showFlaggedDeprecation (buffer.js:159:11)
    at new Buffer (buffer.js:174:3)
    at Object.<anonymous> (path/to/node_modules/ftp/lib/connection.js:52:17)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
@samjegal
Copy link

samjegal commented Jan 7, 2020

Same issue above. data-uri-to-buffer version set "1".

node_modules/get-uri/package.json
  "dependencies": {
    "data-uri-to-buffer": "1",
    "debug": "2",
    "extend": "~3.0.2",
    "file-uri-to-path": "1",
    "ftp": "~0.3.10",
    "readable-stream": "2"
  },

@tutanra
Copy link

tutanra commented Jul 8, 2020

I change mannually for
-> bytesNOOP = new Buffer.from('NOOP\r\n');

Same error appear with electron^9 and makes slow start.

@frosas
Copy link

frosas commented Jul 29, 2020

#230 fixes this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants