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

Yarn 1.6.0 prints deprecation warning using node 10 rc #5704

Closed
SimenB opened this issue Apr 19, 2018 · 2 comments
Closed

Yarn 1.6.0 prints deprecation warning using node 10 rc #5704

SimenB opened this issue Apr 19, 2018 · 2 comments
Assignees
Labels

Comments

@SimenB
Copy link
Contributor

SimenB commented Apr 19, 2018

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

Bug, I suppose

What is the current behavior?

$ NODE_OPTIONS=--trace-warnings yarn
yarn install v1.6.0
warning You are using Node "10.0.0-rc.0" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"
(node:72741) [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> (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:146012:18)
    at __webpack_require__ (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:22:30)
    at Object.<anonymous> (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:76874:16)
    at __webpack_require__ (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:22:30)
    at Object.module.exports.gf (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:45967:11)
    at __webpack_require__ (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:22:30)
    at Object.module.exports.Object.defineProperty.value (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:41400:11)
    at __webpack_require__ (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:22:30)

Comes from tar-stream: https://github.com/mafintosh/tar-stream/blob/d38b9661d28923e7c31b47c1c012ff8ffb46ecb5/pack.js#L14

See mafintosh/tar-stream#79

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?
No warning, although I'm not sure if there's anything you can do in yarn (beyond changing out the dep)

Please mention your node.js, yarn and operating system version.
node 10.0.0-rc.0, yarn 1.6.0, macOS

@malonehedges
Copy link

Duplicate of #5477 ?

BYK pushed a commit that referenced this issue Apr 26, 2018
**Summary**

Fixes #5477 and #5704.

Remove usager of deprecated `Buffer`constructor to avoid ugly warnings on Node 10.

**Test plan**

Existing test should pass.
@felixrabe
Copy link

As a workaround for now, I've created a ~/bin/node script that comes before (Homebrew-installed) /usr/local/bin/node in my $PATH:

#!/bin/bash

/usr/local/bin/node --no-deprecation "$@"

@BYK BYK closed this as completed Apr 26, 2018
rhysd added a commit to neovim/node-client that referenced this issue May 18, 2018
…s fixed

From Node v10, some deprecated `Buffer` APIs were deleted and it breaks
Yarn v1.6.0. Until new Yarn version is published, we need to continue to
use Node v9 to avoid this problem.

Yarn's fix is ongoing at this PR:
yarnpkg/yarn#5704
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

5 participants