相关疑难解决方法(0)

如何在Angular2中使用'crypto'模块?

我安装模块:

npm install --save crypto
Run Code Online (Sandbox Code Playgroud)

我将其导入到我的组件中:

import { createHmac } from "crypto";
Run Code Online (Sandbox Code Playgroud)

但是我得到了错误:

--------------(4,28)中的错误:找不到模块“ crypto”。

我究竟做错了什么?

node.js typescript angular

6
推荐指数
2
解决办法
8909
查看次数

标签 统计

angular ×1

node.js ×1

typescript ×1