【发布时间】:2019-12-28 11:56:05
【问题描述】:
我无法使用@azure/ms-rest-nodeauth 通过loginWithServicePrincipalSecretWithAuthResponse 进行身份验证(甚至查看响应错误)。以下代码段:
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
msRestNodeAuth.loginWithServicePrincipalSecret(
clientID,
clientSecret,
tenantID
).then((r) => console.log("Authenticated")).catch(e => {
console.log(e)
throw e;
});
将TypeError: fetch is not a function 打印到控制台。我正在使用带有 Typescript 的节点 12.9.1 中的包。
【问题讨论】:
标签: node.js typescript azure