Coder Social home page Coder Social logo

node-javascript-barcode's People

Contributors

keillion avatar yushulx avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

node-javascript-barcode's Issues

ReferenceError: self is not defined

Getting following error

0|index  | ReferenceError: self is not defined
0|index  |     at Function.<anonymous> (/root/barcode-reader/node_modules/dynamsoft-node-barcode/dist/dbr.js:11:37428)
0|index  |     at Generator.next (<anonymous>)
0|index  |     at /root/barcode-reader/node_modules/dynamsoft-node-barcode/dist/dbr.js:11:34867
0|index  |     at new Promise (<anonymous>)
0|index  |     at s (/root/barcode-reader/node_modules/dynamsoft-node-barcode/dist/dbr.js:11:34615)
0|index  |     at Function.loadWasm (/root/barcode-reader/node_modules/dynamsoft-node-barcode/dist/dbr.js:11:37279)
0|index  |     at Function.<anonymous> (/root/barcode-reader/node_modules/dynamsoft-node-barcode/dist/dbr.js:11:41682)
0|index  |     at Generator.next (<anonymous>)
0|index  |     at /root/barcode-reader/node_modules/dynamsoft-node-barcode/dist/dbr.js:11:34867
0|index  |     at new Promise (<anonymous>)

Here is the code which I am running

const express = require('express');
const dotenv = require('dotenv');
dotenv.config();

const app = express();

app.post('/test', async (req, res) => {

  let Dynamsoft = require('dynamsoft-node-barcode');
  // Please visit https://www.dynamsoft.com/CustomerPortal/Portal/TrialLicense.aspx to get a trial license
  Dynamsoft.BarcodeReader.productKeys = process.env.LICENCSE_KEY;

  let reader = await Dynamsoft.BarcodeReader.createInstance();
  let response = [];
  for (let result of await reader.decode('https://demo.dynamsoft.com/dbr/img/AllSupportedBarcodeTypes.png')) {
    response.push(result.barcodeText);
  }
  res.send({ result: response })
  reader.destroy();
})

app.listen(PORT, () => console.log(`BAR CODE READER SERVER AT PORT: ${PORT}`));

Also I have noticed that purchased key is very small compared to trial one.

Trial License --> xxxxxxQAAALU5iIEu4UvLOwuP1jRYrIEkJemxC7qJk0DjzJ2sU1rBSyCh0GQ5ooGrvgzQ/8tqennPSf7T3uFu5JgiTt35RFpBzaubL7Hxxxxx
Purchased License --> xxxac2xx

Please reply at earliest. Our production is down due to this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.