【发布时间】:2020-01-18 01:17:51
【问题描述】:
从 @types/forge-apis 导入 AuthClientTwoLegged 类时,我总是收到错误消息
import { AuthClientTwoLegged} from 'forge-apis';
...
var oAuth2TwoLegged = new AuthClientTwoLegged(CLIENT_ID, CLIENT_SECRET, [
'data:read',
'data:write'
]);
类型在tsconfic.json中定义:
"types": ["forge-viewer", "forge-apis"]
【问题讨论】:
-
您是否安装了
@types/forge-apis作为您的开发依赖项? -
是的,它是作为开发依赖安装的
-
错误信息:
Module not found: Error: Can't resolve 'forge-apis' in -
你的打字稿版本是什么? 2.0+ 还是...?