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

Hello,
Our application relies on tap:i18n which relies on the deprecated : cfs:http-methods package.
The message appears :

(STDERR) (node:24329) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(STDERR)     at showFlaggedDeprecation (buffer.js:178:11)
(STDERR)     at new Buffer (buffer.js:261:3)
(STDERR)     at packages/cfs_http-methods.js:631:30
├─┬ tap:i18n@1.8.2                            
│ ├─┬ aldeed:simple-schema@1.3.3              
│ │ ├── check@1.3.1 (expanded above)          
│ │ ├── deps@1.0.12 (expanded above)          
│ │ ├── random@1.1.0 (expanded above)         
│ │ └── underscore@1.0.10                     
│ ├─┬ cfs:http-methods@0.0.32                 
│ │ ├── ejson@1.1.1 (expanded above)          
│ │ ├── underscore@1.0.10                     
│ │ └── webapp@1.8.2 (expanded above) 

Do you know how to solve this ?
Thanks

2 Likes

I just started getting this too after an update to Meteor 1.9. I think it’s because the Meteor core http package that cfs:http-methods depends on uses the npm buffer package which is now deprecated. At the very least how it calls Buffer() is deprecated. So no updates or hot-rods to any 3rd-party package will fix this. It’s a core issue.

There’s a Meteor issue out for updating the use of the request package.

1 Like

You are right. It appears also around mid february after 1.9 update. Thanks for your link that I will watch.

1 Like

@dokithonon I’m having exactly the same issue with tap:i18n + cfs:http-methods after upgrading Meteor from v1.8.3 to v1.11.1. Did you manage to solve this?

Hello, no we still have this annoying message in our log…

1 Like

@racosad After your message, I decided to fix it.
Here is the fix : https://github.com/dokithonon/Meteor-http-methods/commit/4b281a294dfac8e68c0502bd002515e67e54fc4c

You can download the cfs-http-methods package, change these 3 lines of codes and put the package in your /packages folder.

Hope this helps.

Regards

2 Likes

Great! Thank you :grin: