jsencrypt icon indicating copy to clipboard operation
jsencrypt copied to clipboard

_jsencrypt2.default is not a constructor

Open CatWithWings opened this issue 7 years ago • 6 comments

I use it with webpack like this: `import JSEncrypt from '../../static/js/jsencrypt/jsencrypt';

let encrypt = new JSEncrypt(); `

but it get an error code: _jsencrypt2.default is not a constructor

CatWithWings avatar Jan 23 '18 07:01 CatWithWings

the same problem with me, sad

xing00 avatar Jan 25 '18 09:01 xing00

hi, try to install it via npm and use like this

https://github.com/llCorvinSll/RSA_test/blob/master/bench/src/bench/bench.ts

llCorvinSll avatar Jan 26 '18 07:01 llCorvinSll

the right import way is : import { JSEncrypt } from 'jsencrypt'

xing00 avatar Jan 26 '18 07:01 xing00

the right import way is : import { JSEncrypt } from 'jsencrypt'

zrqabc avatar Mar 22 '19 09:03 zrqabc

this usage would be a good addition to the 'how to use this library' section of the README

nickolas1 avatar Jun 14 '19 13:06 nickolas1

the right import way is : import { JSEncrypt } from 'jsencrypt'

Thankyou! ❤❤🧡🧡💗

ShadmanFatin avatar Jan 24 '22 00:01 ShadmanFatin