智能感知中显示模块时找不到模块

时间:2020-08-04 07:56:08

标签: javascript angular typescript graphql aws-amplify

我正在尝试根据提供的扩增文档导入突变,查询和订阅。

import * as queries from './graphql/queries';
import * as mutations from './graphql/mutations';
import * as subscriptions from './graphql/subscriptions';

但是,当我实际尝试将其应用到我的项目中时,会出现错误TS2307。

Image with error

即使它出现在我的智能感知中,如下图所示。

Intellisense able to find the file

我无法终生弄清楚为什么,用错误的方式搜索过,搜索过的情况,但没有明确的答案可以解决我的问题...

编辑:我的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
  }
}

0 个答案:

没有答案