node-escpos icon indicating copy to clipboard operation
node-escpos copied to clipboard

escpos@v3

Open lsongdev opened this issue 5 years ago • 14 comments

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.

lsongdev avatar Feb 24 '20 04:02 lsongdev

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

gersur avatar Feb 24 '20 12:02 gersur

Is there a tutorial for using v3

bigrocs avatar Feb 25 '20 00:02 bigrocs

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

image

bigrocs avatar Feb 25 '20 01:02 bigrocs

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

lsongdev avatar Feb 25 '20 04:02 lsongdev

@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

chourouk-mrad avatar Feb 25 '20 16:02 chourouk-mrad

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! [email protected] install: node-gyp configure build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] 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

gpallas16 avatar Feb 25 '20 18:02 gpallas16

@gpallas16 Please referred to node-bluetooth .

lsongdev avatar Feb 26 '20 05:02 lsongdev

@chourouk-mrad what version of Node.js ?

lsongdev avatar Feb 26 '20 14:02 lsongdev

@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

sudippaudel793 avatar Apr 07 '20 09:04 sudippaudel793

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...

yelhouti avatar Jan 28 '21 01:01 yelhouti

@ 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?

ehmad avatar Aug 03 '21 17:08 ehmad

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

FawzyMokhtar avatar Jan 14 '22 02:01 FawzyMokhtar

@ 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 avatar Mar 01 '24 12:03 prashanta-sam-velectico

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

prashanta-sam-velectico avatar Mar 01 '24 12:03 prashanta-sam-velectico