instascan icon indicating copy to clipboard operation
instascan copied to clipboard

Using ES6 imports/exports since require('instascan') fails

Open chidindu-ogbonna opened this issue 6 years ago • 4 comments

I need to able to use import statement

Using require('instascan') fails, raising an error

This dependency was not found:
fs in ./node_modules/instascan/src/zxing.js
To install it, you can run: npm install --save fs

chidindu-ogbonna avatar Aug 03 '18 00:08 chidindu-ogbonna

Same problem

shnigi avatar Dec 13 '18 08:12 shnigi

FWIW, looks like this library has ES6 module support https://github.com/cozmo/jsQR#npm

rjcorwin avatar Feb 02 '19 16:02 rjcorwin

This issue still not solved? well, i will use other library

nothing628 avatar Feb 26 '19 03:02 nothing628

I had the same problem and took action to made a build with UMD support. https://github.com/rubenspgcavalcante/instascan-umd

Can be used with require/import statements

rubenspgcavalcante avatar Apr 09 '19 14:04 rubenspgcavalcante