lsongdev / lsongdev/node-escpos
DeprecationWarning: Buffer() is deprecated due to security and usability issues
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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