针对你提出的“nodejs referenceerror: cryptojs is not defined”问题,以下是一些可能的解决步骤和原因分析: 确认crypto-js库的安装: 确保你已经正确安装了crypto-js库。你可以通过运行以下命令来安装它: bash npm install crypto-js 如果安装过程中没有出现错误,那么库应该已经成功安装在你的项目中。 检查代码中...
控制台中会出现javascript错误:这次研究下 nodejs 的 crypto 模块,它提供了各种各样加密算法的 API。
import * as CryptoJS from '../../node_modules/crypto-js/crypto-js'; When hovering the mouse over the red squiggly under the path, it says: *[ts] Module '../../node_modules/crypto-js/crypto-js' was resolved to '/Users/tim/repos/myra-client-server/tyno-lrs/node_modules/crypto-js...