-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Replace use of deprecated/unsafe new Buffer constructor #5477
Comments
Getting this same warning on macOS. I believe #5704 is a duplicate of this. |
As a workaround for now, I've created a
|
FYI: Just went through yarn's dependencies and there are two which still call
We will likely need to update those. |
This comment has been minimized.
This comment has been minimized.
**Summary** These are a few upgrades of dependencies in order to address issues on node 10 (in relation to: #5477) *duplexify* *3.5.0* => *3.5.4* (mafintosh/duplexify@00d08fa) *v8-compile-cache* *^1.1.0* => *^2.0.0* (zertosh/v8-compile-cache#7) *natives* *1.1.0* => *1.1.3* (gulpjs/gulp#2162) The last did not have to do with `new Buffer` but was something I personally encountered when using `gulp` for building in `node 10`. I don't know how common this is, but the fix is easy and within scope, so decided to include it. **Test plan** CI should be green.
@vrobinson Yes, they should be fixed by #6208 -- You can see this by searching the standalone JS for Update: Looks like it just landed 🎉 so watch for the next nightly. To everyone who helped make this happen, 🙇♂️ thank you 🙏! |
I got this error, was this solved? |
@rof20004 ☝️(right above your comment). PR has merged, so it is now "fixed" on the |
@jacobq I am using debian package, I need to wait until the new package then '-'. Thanks :) |
@rof20004 You should be able to start using it tomorrow, if you want, just make sure you have |
@jacobq so we're going to see this finally issue finally resolved once for all with yarn@1.9.5, correct? |
Probably won't be a patch release, more like 1.10 |
I have the same problem. |
someone has the solution? |
@codestart123 read the thread, they said it's fixed in nightly but not released yet. |
@codestart123 The error you mentioned is not caused by this issue (you can ignore the deprecation warning):
|
Summary: SourceCred officially supports Node v8.x.x, so Travis should be testing against that version of Node. This fixes a cron-only, Travis-only failure. The test for the build script asserts that stderr only contains some known expected messages. On Node v10, which Travis was using, there is an additional deprecation message due to <yarnpkg/yarn#5477>. Test Plan: To see that this fixes the current cron-only build failure, add the `--full` argument to the `test` script in `package.json`, and push the resulting tree to Travis. Note that it runs `sharness-full`, which passes. wchargin-branch: travis-node-8
Summary: SourceCred officially supports Node v8.x.x, so Travis should be testing against that version of Node. This fixes a cron-only, Travis-only failure. The test for the build script asserts that stderr only contains some known expected messages. On Node v10, which Travis was using, there is an additional deprecation message due to <yarnpkg/yarn#5477>. Test Plan: To see that this fixes the current cron-only build failure, add the `--full` argument to the `test` script in `package.json`, and push the resulting tree to Travis. Note that it runs `sharness-full`, which passes. wchargin-branch: travis-node-8
Summary: SourceCred officially supports Node v8.x.x, so Travis should be testing against that version of Node. This fixes a cron-only, Travis-only failure. The test for the build script asserts that stderr only contains some known expected messages. On Node v10, which Travis was using, there is an additional deprecation message due to <yarnpkg/yarn#5477>. Test Plan: To see that this fixes the current cron-only build failure, add the `--full` argument to the `test` script in `package.json`, and push the resulting tree to Travis. Note that it runs `sharness-full`, which passes. wchargin-branch: travis-node-8
Has it been fixed yet? |
@RyanZhu1024 it was fixed in 1.10.0, released a few days ago 👍 |
Waiting node upgrade yarn version. |
Can't believe this annoying warning is finally gone. Thank you :) Hooraaaay 🙌 🎉 🍾 |
I have a similar problem here, any ideas: https://stackoverflow.com/questions/53201124/how-to-find-source-of-a-problem-inside-a-npm-package-node36378-dep0005-dep |
@goktugyil The question you linked does not make any mention of @arcanis / @BYK / @imsnif Would you mind locking this thread? This problem has been fixed in yarn and its dependencies for a while now, and I don't think further discussion here will benefit anyone. |
What is the current behavior?
yarn
uses deprecatednew Buffer()
constructor and causes deprecation warnings when run withNODE_PENDING_DEPRECATION=1
.What is the expected behavior?
yarn
should not use deprecated/unsafeBuffer
constructor. According to the deprecation warningnew Buffer()
should be replaced with one ofBuffer.alloc()
,Buffer.allocUnsafe()
orBuffer.from()
; thesafe-buffer
package is another option.Please mention your node.js, yarn and operating system version.
The text was updated successfully, but these errors were encountered: