lsongdev / lsongdev/node-escpos

DeprecationWarning: Buffer() is deprecated due to security and usability issues

Open
#220 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.6k
Forks
443
PR merge metrics
No merged PRs in 30d

Description

I am using Bluetooth to print the demo of index.js in the example folder; it works well with a print out but got this Warning after the run command: node index.js; but if I run the command again, it print out nothing; the command was skipped

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

I can not fix this issue by myself, Please advice!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect example/index.js and the code it invokes for deprecated Buffer() usage; reproduce the warning with node index.js if the Bluetooth printer setup is available. Done means the warning is gone and the demo still prints on its first and subsequent runs.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript
Domain
embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.