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

LIBUSB_ERROR_NOT_FOUND #14

Closed
keyiis opened this issue Nov 2, 2016 · 2 comments
Closed

LIBUSB_ERROR_NOT_FOUND #14

keyiis opened this issue Nov 2, 2016 · 2 comments

Comments

@keyiis
Copy link

keyiis commented Nov 2, 2016

系统环境 win10 x64 nodejs 4.6
打印机是 佳博t2120 小票打印机
npm i 过程没有报错,但是运行下面的命令就报错

D:\work\nodejs\node-escpos>node examples/image.js
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: LIBUSB_ERROR_NOT_FOUND
    at Error (native)
    at Device.usb.Device.open (D:\work\nodejs\node-escpos\node_modules\usb\usb.js:33:7)
    at USB.open (D:\work\nodejs\node-escpos\adapter\usb.js:77:15)
    at D:\work\nodejs\node-escpos\examples\image.js:9:10
    at D:\work\nodejs\node-escpos\image.js:51:5
    at D:\work\nodejs\node-escpos\node_modules\get-pixels\node-pixels.js:22:5
    at null.<anonymous> (D:\work\nodejs\node-escpos\node_modules\get-pixels\node_modules\pngjs\lib\png.js:74:7)
    at g (events.js:260:16)
    at emitOne (events.js:77:13)
    at emit (events.js:169:7)

下面是运行npm i的log

D:\work\nodejs\node-escpos>npm i
-
> serialport@4.0.4 install D:\work\nodejs\node-escpos\node_modules\serialport
> node-pre-gyp install --fallback-to-build

[serialport] Success: "D:\work\nodejs\node-escpos\node_modules\serialport\build\Release\serialport.node" is installed via remote

> usb@1.2.0 install D:\work\nodejs\node-escpos\node_modules\usb
> node-pre-gyp install --fallback-to-build

[usb] Success: "D:\work\nodejs\node-escpos\node_modules\usb\src\binding\usb_bindings.node" is installed via remote
mutable-buffer@2.0.3 node_modules\mutable-buffer

iconv-lite@0.4.13 node_modules\iconv-lite

qr-image@3.1.0 node_modules\qr-image
└── pako@0.2.9

get-pixels@3.3.0 node_modules\get-pixels
├── omggif@1.0.8
├── data-uri-to-buffer@0.0.3
├── node-bitmap@0.0.1
├── parse-data-uri@0.2.0
├── through@2.3.8
├── mime-types@2.1.12 (mime-db@1.24.0)
├── ndarray@1.0.18 (iota-array@1.0.0, is-buffer@1.1.4)
├── pngjs@2.3.1
├── jpeg-js@0.1.2
├── ndarray-pack@1.2.1 (cwise-compiler@1.1.2)
└── request@2.76.0 (tunnel-agent@0.4.3, aws-sign2@0.6.0, forever-agent@0.6.1, oauth-sign@0.8.2, is-typedarray@1.0.0, caseless@0.11.0, stringstream@0.0.5, isstream@0.1.2, aws4@1.5.0, json-stringify-safe@5.0.1, extend@3.0.0, qs@6.3.0, node-uuid@1.4.7, combined-stream@1.0.5, form-data@2.1.1, tough-cookie@2.3.2, hawk@3.1.3, http-signature@1.1.1, har-validator@2.0.6)

serialport@4.0.4 node_modules\serialport
├── bindings@1.2.1
├── commander@2.9.0 (graceful-readlink@1.0.1)
├── nan@2.4.0
├── debug@2.2.0 (ms@0.7.1)
├── object.assign@4.0.4 (function-bind@1.1.0, object-keys@1.0.11, define-properties@1.1.2)
└── lie@3.1.0 (immediate@3.0.6)

usb@1.2.0 node_modules\usb
└── nan@2.4.0

@lsongdev
Copy link
Owner

lsongdev commented Nov 3, 2016

duplicate to #12

@lsongdev lsongdev closed this as completed Nov 3, 2016
@apemen
Copy link

apemen commented Apr 21, 2020

你好,问下,我用

const escpos = require('escpos'); escpos.USB = require('escpos-usb'); const device = new escpos.USB(0x1ad4,0x00c8);
为什么么有反应,也没有报错也没有输出

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants