javascript - 在智能感知上显示模块时找不到模块
问题描述
我正在尝试根据提供的放大文档导入突变、查询和订阅。
import * as queries from './graphql/queries';
import * as mutations from './graphql/mutations';
import * as subscriptions from './graphql/subscriptions';
但是,当我实际尝试将其应用于我的项目时,它给了我错误 TS2307。
即使它出现在我的智能感知上,如下图所示。
我一生都无法弄清楚为什么,用谷歌搜索了错误,用谷歌搜索了情况,但没有明确的答案能够解决我的问题......
编辑:我的 tsconfig 文件按要求。
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"lib": [
"es2018",
"dom"
]
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}
解决方案
推荐阅读
- swiftui - 每次更改 @State 时防止重排/重绘
- typo3 - 如何防止 tx_news 插件为任意新闻记录呈现单一视图?
- java - 如何从 JPA 中的日期列表中查询?
- android - Android - 我们可以防止通过 ADB Shell 启动活动吗?
- c# - 打开多个 MS Project 文件时如何修复 RPC_E_CALL_REJECTED 错误?
- ios - 升级到 WKWebView Ionic 3 后 iOS 应用程序启动后出现白屏
- python-3.x - 为什么内置函数 id(constant) 在 Python 中获取值?
- regex - 如何使用 awk 找到一个模式,然后向下移动一定数量的行,然后打印?
- python - 在 spacy 标记器评估中获取 pos 标记器的特定于标记的准确性
- python - 如何在 aws 中使用 boto3 创建不可公开访问的存储桶和对象?