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

(node:3184) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. #5770

Closed
aamorozov opened this issue May 1, 2018 · 26 comments
Assignees
Labels

Comments

@aamorozov
Copy link

Do you want to request a feature or report a bug?

I don't think it's a bug but might be good to resolve it in the future.
What is the current behavior?
The deprecation warning is thrown when installing a package with yarn add and node >= 10.
If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?
No deprecation warnings.
Please mention your node.js, yarn and operating system version.

macOS High Sierra, version 10.13.4
Node v. 10
Yarn v. 1.6.0

@ghost ghost assigned torifat May 1, 2018
@ghost ghost added the triaged label May 1, 2018
@aamorozov aamorozov changed the title (node:3184) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (node:3184) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. May 1, 2018
@MrCheater
Copy link

+1

@simonkberg
Copy link
Contributor

This is already being tracked in #5477

@denisinla
Copy link

So we need to revert to using npm for projects until this is complete right? I get reminded of said error via yarn but not with npm. But all packages fail to install via yarn.

@simonkberg
Copy link
Contributor

simonkberg commented May 1, 2018

@denisinla if packes fail to install you're having some unrelated issue, although you will still see this warning if you're using Node 10 which might be confusing. This is a deprecation warning in Node, the old API is still present and works like before.

I suggest you open a separate issue discribing your error (and include the error log), this issue will most likely be closed since it's a dupe.

@aamorozov
Copy link
Author

👍

@AbhimanyuAryan
Copy link

How to fix this?

@aleph1ow
Copy link

aleph1ow commented May 10, 2018

I got this problem after trying to install Inkscape via brew and uninstalling it because brew fails to install some dependencies.

  • Mac OS 10.13.4
  • node v10.1.0
  • yarn 1.6.0
(node:13897) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

@Stahlion
Copy link

Stahlion commented May 12, 2018

+1
Mac OS 10.13.4
node 10.1.0
yarn 1.6.0

Running: yarn dev
"(node:38325) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead."

@derekbtw
Copy link

+1

Windows 10 v1803
node v10.1.0
yarn v1.6.0

$ yarn run dev

(node:14480) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

@wachunei
Copy link

This is showing up a lot recently. The fix is already committed to master, just wait for a new release #5477

@zwhitchcox
Copy link

Does anyone know how to install this version? with a fresh install, this is still happening fo rme

@zwhitchcox
Copy link

It looks like the nightly msi version is broken, as it installs a different version of yarn than it says it's downloading: https://yarnpkg.com/en/docs/install#windows-nightly

It says it's installing 1.10.0, but installs 1.9.0

@zwhitchcox
Copy link

zwhitchcox commented Jul 31, 2018

Idk, maybe I'm just still having the same problem...this is my console output

$ yarn
yarn install v1.9.0-20180706.1017
warning package-lock.json found. Your project contains lock files generated by tools other than
 Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies c
aused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
[-------------------------------------------------------------------------------------] 0/1449(
node:11232) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability
issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
error inotify@1.4.2: The platform "win32" is incompatible with this module.

It looks like it's using v1.9.0, but the package.json version is 1.10.0...idk, can I just use npm to install yarn? Is there some reason yarn needs it's own installer?

@zwhitchcox
Copy link

Ok, it worked when I npm install yarn@latest.

@samuelcastro
Copy link

samuelcastro commented Aug 9, 2018

Just brew upgrade yarn

@xuyuheng
Copy link

+1

@shirshak55
Copy link

still same :( why do even such minor issue don't get fixed . Really hate those irritating warning

@axelkennedal
Copy link

I'm also getting this error with the latest version of Yarn (1.9.4)

@eugene-rn
Copy link

+1 (1.9.4)

@akeuk
Copy link

akeuk commented Sep 8, 2018

still warning on yarn 1.9.4

@denisinla
Copy link

Can confirm with 1.9.4 error is still present.

@manu-st
Copy link

manu-st commented Sep 22, 2018

And in 1.10.0 too.

@Norbert1001001
Copy link

Norbert1001001 commented Sep 24, 2018

Having the same issue with node > 10, angular-cli 6.2.0 and webpack-cli 3.1.0. No yarn installed or used.

@dennisroche
Copy link

It appears fixed in yarn 1.10.1 👍 cc/ @manu-st @denisinla

@Esqarrouth
Copy link

@isaiahdaviscom
Copy link

I am having this issue in vs code with the following specs:
Windows 10
yarn@1.13.0
npm@6.7.0

If there is anyone that could help it would be immensely appreciated. I do not have a strong development background I am trying to set up a debug environment. Thanks.

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

No branches or pull requests