I used yarn add crypto-js to install and it's the latest version 4.1.1. However, no matter it's import CryptoJS from "crypto-js" or const CryptoJS = require("crypto-js"), I just couldn't use CryptoJS.enc, CryptoJS.AES and anything else, and WebStorm always tells me something like unresolved variable enc.
I don't understand why I meet this problem since everything is right with my other imports or requires.
I used
yarn add crypto-js
to install and it's the latest version 4.1.1. However, no matter it'simport CryptoJS from "crypto-js"
orconst CryptoJS = require("crypto-js")
, I just couldn't useCryptoJS.enc
,CryptoJS.AES
and anything else, and WebStorm always tells me something likeunresolved variable enc
. I don't understand why I meet this problem since everything is right with my other imports or requires.