barcode icon indicating copy to clipboard operation
barcode copied to clipboard

require issue

Open vwasteels opened this issue 9 years ago • 3 comments

Hello !

I just installed GM + barcode this way :

brew install graphicsmagick
npm install --save barcode

I'm trying to use it this way :

var barcode = require('barcode');

barcode('ean13', {
    data: myEan13,
    width: 400,
    height: 100,
});

but I get this error in the browser console :

Uncaught Error: Cannot find module './lib/ean13'

I verified in the node_modules/barcode folder, the file ./lib/ean13s exists ...

Any idea ? Thanks !!

vwasteels avatar Oct 07 '15 12:10 vwasteels

Which version of node are you using?

samt avatar Oct 24 '15 17:10 samt

2.7.4 But now I switched to another plugins using jquery :)

Thanks anyway !!

vwasteels avatar Oct 25 '15 19:10 vwasteels

Same here! Can't use cos of require error.

lznt avatar Jan 27 '16 16:01 lznt