typescript - 找不到模块“@foundry/ontology-api”或其相应的类型声明
问题描述
在分支上重构 typescript 文件时,import 语句中的 @foundry/ontology-api 模块之一出现以下错误:
[typescript] 找不到模块“@foundry/ontology-api”或其对应的类型声明
刷新页面并重新启动代码辅助并没有消除错误。
package.json 文件似乎缺少此模块的包依赖项,但是我无法找到适合此模块的参考,该参考将描述我应该使用的当前版本以及浏览代码以了解更多信息的方法关于 API。有什么办法吗?
作为参考,项目 package.json 文件包含:
{
"name": "my-functions",
"version": "0.0.0",
"description": "My useful functions",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"dependencies": {
"@foundry/functions-api": "0.43.0",
"@foundry/functions-typescript-runtime-internal-api": "0.20.0",
"@foundry/functions-utils": "0.1.0"
},
"devDependencies": {
"@foundry/functions-typescript-authoring-dev": "0.37.0",
"@foundry/functions-typescript-ontology-code-generator": "0.28.0",
"@foundry/functions-typescript-discovery": "0.17.0",
"@foundry/functions-typescript-object-set-base": "1.18.0",
"@foundry/functions-testing-lib": "0.3.0",
"jest": "24.9.0"
},
"scripts": {
"build": "../gradlew build",
"check": "../gradlew check",
"test": "../gradlew test",
"jest": "jest"
},
"license": "UNLICENSED"
}
解决方案
这似乎是后端的临时问题,因为 @foundry/ontology-api 模块引用现在已被 Code Assist 识别。
该模块似乎也不需要明确的项目参考(因为“转到定义”链接按预期工作)。
推荐阅读
- python - 在 2 个日期 Pandas 之间插入重复的行数据
- robotframework - POST 请求 PNG 图像返回不正确的 mimetype
- python - 如何使用gridFS将数据保存在mongoDB中
- c# - 无法使用 LINQ 解析 XML 文件中的属性
- hdfs - 如何为 ha-hdfs 中的两个名称节点提供集群 ID
- netlogo - Netlogo:如何让乌龟检查半径中的变量
- javascript - 使用麦克风意外结束输入
- javascript - 从 javascript 执行 javascript
- go - http: 多余的响应。WriteHeader 调用 StatusOK
- python-3.x - 如果条件,熊猫分配字段