lsongdev / node-escpos

🖨️ ESC/POS Printer driver for Node.js
https://npmjs.org/escpos
Other
1.38k stars 423 forks source link

escpos@v3 #264

Open lsongdev opened 4 years ago

lsongdev commented 4 years ago

Hello everyone,

Today, we published first alpha version of v3. A BREAKING CHANGE.

I move adapter out of escpos the main package to escpos-* package to fix #221 #260 #214

Welcome report bug, or fork + commit and send pull-request to this repo. I'll review and merge it ASAP.

Thanks.

gersur commented 4 years ago

Why the version back to 0.x.x? This can led confusing for package manager If it breaking changes, then do major versioning.

Please follow semantic versioning https://devhints.io/semver -----EDIT------- It's an alpha version Should be v3.0.0-alpha-1

bigrocs commented 4 years ago

Is there a tutorial for using v3

bigrocs commented 4 years ago

v3 Cannot find module './printer' Printer.Printer = require('./printer');

image

lsongdev commented 4 years ago

@g3rrydanc3 Oh, my mistake, now it's correct. @bigrocs I updated README file. And it will show you how to use in v3 version.

chourouk-mrad commented 4 years ago

@song940

When i try to connect to the printer via network.

const connection = new escpos.Network(address);

I get the error Unhandled Rejection (TypeError): net.Socket is not a constructor

Do you have an idea if it's related to the new released version or it's something else ?

NB: my printer is EPSON TM-U220

gpallas16 commented 4 years ago

When I run npm i escpos-bluetooth runs automatically node-gyp configure build and then I get this error:

ELIFECYCLE npm ERR! errno 1 npm ERR! node-bluetooth@1.2.6 install: node-gyp configure build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-bluetooth@1.2.6 install script.

Should I install or configure anything else before installing the bluetooth adapter?

My current setup: Windows 10 Electron 7.1.5 Node 12.16.1 Npm 6.13.4

lsongdev commented 4 years ago

@gpallas16 Please referred to node-bluetooth .

lsongdev commented 4 years ago

@chourouk-mrad what version of Node.js ?

sudippaudel793 commented 4 years ago

@gpallas16 Please referred to node-bluetooth .

same problem occured with mac os. i have node-gyp of version v6.1.0 but also escpos-bluetooth is not installed and shows the error below:- image

yelhouti commented 3 years ago

Since we are moving to v3 and already have breaking changes, can we just use async await instead of all the callbacks. For example open could just return a Promise that fails when open fails...

ehmad commented 3 years ago

@ chourouk-mrad

When i try to connect to the printer via network.

const connection = new escpos.Network(address);

I get the error Unhandled Rejection (TypeError): net.Socket is not a constructor

Do you have an idea if it's related to the new released version or it's something else ?

NB: my printer is EPSON TM-U220

I also encountered the same problem.Did you solve it?

FawzyMokhtar commented 2 years ago

Can we use this package in Ionic 6 to support printing on Android & IOS ? @song940

prashanta-sam-velectico commented 9 months ago

@ chourouk-mrad When i try to connect to the printer via network. const connection = new escpos.Network(address); I get the error Unhandled Rejection (TypeError): net.Socket is not a constructor Do you have an idea if it's related to the new released version or it's something else ? NB: my printer is EPSON TM-U220

I also encountered the same problem.Did you solve it?

I am getting this error "escpos.Network is not a constructor"

prashanta-sam-velectico commented 9 months ago

I am getting this error "escpos.Network is not a constructor"