node-escpos prints twice
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 40/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript, nodejs
- 領域
- embedded-iot
調査の方向性
index.js と、レポートに示されている device.open コールバックから始め、コールバックのログとプリンターの出力を観察しながら node index.js を実行します。コールバックが 2 回呼び出される理由を追跡し、コールバックとテキストがそれぞれ 1 回だけ処理されることを確認します。
索引モデルが issue の本文から書いたものです。
説明
I have the following code
const escpos = require('escpos');
escpos.USB = require('escpos-usb');
const device = new escpos.USB(2727, 772);
const options = { encoding: "ISO8859-15" /* default */ }
const printer = new escpos.Printer(device, options);
device.open(function(error){
console.log("internal call")
printer
.text("Test123 This is a happy printer doing it's job twice. Too happy?")
.close()
});
when I run the code with
$node index.js
the thermal printer will print the text twice. I have also tried to add the cut() flush() method within the open callback method. I can see that this callback method is called two times, as in the console it prints "internal call" twice.
Expected: the printer only prints the text once.
Thanks for the help
- 主要言語
- TypeScript
- スター
- 1.6k
- フォーク
- 443
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
lsongdev/node-escpos のほかの issue
-
[BUG]:オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
lsongdev/node-escpos#447 ·
-
[BUG]: AJCBOSEオープンbug
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
lsongdev/node-escpos#446 ·
-
Capt Bilalオープン
難易度 5/5 1週間以上 初心者へのやさしさ 1/100
lsongdev/node-escpos#443 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
lsongdev/node-escpos#442 · リアクション 2 件 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
lsongdev/node-escpos#441 · コメント 5 件 · リアクション 1 件 ·
lsongdev/node-escpos の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
cameri/nostream#811 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug p3 triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
bug javascript P2-medium python release:v3.1
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
adrirubio/claude-deck#546 ·
メンテナーはふだん 1 日以内に返信
-
area: desktop area: website priority: P2 type: feature
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
appandflow/stim#3411 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
rjsf-team/react-jsonschema-form#5485 ·
メンテナーはふだん 2 日以内に返信