Search code examples
javascriptangularexceptionjsencrypt

ReferenceError: JSENCRYPT_VERSION is not defined after JSEncrypt 3.0.0


I was using jsencrypt 3.0.0-rc.1 and updated to 3.0.0 just now. Now I am having a following error.

Uncaught ReferenceError: JSENCRYPT_VERSION is not defined.

Temporary Solution : I could get rid of that error by replacing import JSEncrypt from 'jsencrypt' with import JSEncrypt from 'jsencrypt/bin/jsencrypt.min.js'

Found via GitHub

Question: Is there any cleaner solution to this or just have to wait for good fix by the author?


Solution

  • Just update to the 3.0.1 and you are good to go. No more hacks needed.