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

'DeprecationWarning' for the use of 'Buffer without new' #104

Closed
ghost opened this issue Dec 1, 2016 · 8 comments
Closed

'DeprecationWarning' for the use of 'Buffer without new' #104

ghost opened this issue Dec 1, 2016 · 8 comments

Comments

@ghost
Copy link

ghost commented Dec 1, 2016

The warning is as follows:

(node:18403) DeprecationWarning: Using Buffer without new will soon stop working. Use new Buffer(), or preferably Buffer.from(), Buffer.allocUnsafe() or Buffer.alloc() instead.

Caused by using fromFileWithPath and fromBufferWithName. I have not tested the other functions.

@ghost ghost changed the title Getting a 'DeprecationWarning' for the use of 'Buffer without new' 'DeprecationWarning' for the use of 'Buffer without new' Dec 1, 2016
@dbashford
Copy link
Owner

What node are you using?

@ghost
Copy link
Author

ghost commented Dec 2, 2016

Version 7.2.

@stoutmaster
Copy link

Same issue. I downgraded to the LTS version of node 6.9.1 and the message doesn't show up

@josephrocca
Copy link

I get the same warning. Node v7.2.0 Awesome lib, by the way, dbashford. Was about to begrudgingly write my own - lucky I found yours!

@jsinmotion
Copy link

Node team has been tinkering with Buffer and decided to push this deprecation warning. For more context, see nodejs/node#9531

Many modules have been affected by this. Supposedly it will be removed in 7.2.1: nodejs/node#9529 so I think we can just wait it out

@dbashford
Copy link
Owner

I'll take a look at this over the xmas break. Been slammed at work and had a 3rd kid a few months ago so my OSS time has been chopped to critical work related stuff. I do want to jump back into this and get a worthy 2.0 out soon.

@jsinmotion
Copy link

@dbashford Congrats on the kid! you may need a new profile photo :D

@dbashford
Copy link
Owner

I've verified this happens with 7.2.0 but does not with 7.2.1.

I ran the tests after having commented out every last bit of buffer stuff textract did and still got the error. And anyway, textract doesn't create buffers, it just uses the ones it is given.

I have updated all the dependencies to the latest, with the exception of got. I bumped that from 3.3.1 to 5.7.1 but not to 6+ because of its lack of lower node version support. Can tackle that down the road a bit.

And I still get the deprecation. I suspect either a got update or some updates to downstream dependencies are necessary to remove the deprecation notice entirely.

Going to close this out as there isn't much I can do now, and what it is that I could do (hunt through the dependencies looking for the offender) isn't worth the effort, at least until this is a real problem and not just a now-deprecated deprecation. =)

Thanks for reporting it though! Gave me a reason to take a peek at how textract is doing in the 7s.

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